Unnamed Fossil Project

Artifact [a584ec5561]
Login

Artifact a584ec5561fa34c8ff6c85f0027a0a6a98267fa5:

Ticket change [a584ec5561] - New ticket [bc5a45dcf8] encode and decode line format. by Derek 2013-02-24 16:53:13.
D 2013-02-24T16:53:13.716
J comment Many\sof\sthe\smaze\sdrawings\smay\shave\smany\slong\slines.\s\sIn\sfact,\sthey\smay\sconsist\sprimarily\sof\slong\slines.\s\sThis\ssuggests\sa\smethod\sto\sserialize\smazes\smore\sefficiently.\sInstead\sof\sstoring\severy\spixel\sof\sthe\sdrawing\sin\sa\sbinary\sstring,\swe\sstore\sa\slist\sof\slines\swhich\scompose\sthe\sfinal\sdrawing.\s\sAssuming\sthe\scomposition\sof\sthe\smaze\sdrawing\sfollows\sthese\spatterns,\sthis\swill\sbe\sa\smuch\smore\sefficient\sway\sof\srepresenting\sthe\sinformation.\r\n\r\nThe\senvisioned\smethod\srepresents\sall\sdrawing\sinformation\sin\san\sarray\sof\sintegers.\sin\s3\sparts:\r\n\r\nMetadata\s-\sdimensions,\sstart\slocation(s),\send\slocation(s),\send\sdestination(s)\r\nHorizontal\slines\r\nVertical\slines\r\n\r\nBefore\sthe\slist\sof\sstart\slocations,\send\slocations,\sand\send\sdestinations\srespectively,\sthere\sis\san\sinteger\sentry\sindicating\sthe\slength\sof\sthe\scorresponding\slist.\r\n\r\nEnd\sdestination\srefers\sto\sthe\sindex\sof\sthe\sstart\slocation\sthat\sreaching\sthe\scorresponding\send\slocation\swill\steleport\sthe\splayer\sto.\s\sSee\salso\sthe\sdescription\sof\sproposed\smaze\ssequences\sbelow.\s\r\n\r\nLines\sare\sstored\sin\sthe\sfollowing\s2\sentry\sformat:\s\sIndex\soffset\sfrom\slast\sline\shead,\sline\slength.\s\sWhen\sthe\srunning\sindex\sexceeds\sthe\ssize\sof\sthe\sarray,\sthat\smeans\swe\shave\smoved\son\sto\sthe\snew\ssection.\s\sIn\sthe\sraw\sformat\sa\slength\sentry\sof\s1\smay\sbe\somitted.\r\n\r\nOptionally,\san\sextra\ssection\sfor\smanually\sflipping\sthe\svalue\sof\sindividual\spixels\safter\sthe\sother\ssections\sof\sthe\smaze\shave\sbeen\sdrawn\scould\sbe\sconsidered.\s\sThe\shoped\sbenefit\sis\sthat\swe\scan\sencode\smuch\slonger\slines\sand\sthen\sonly\sspecify\sbreaks\sin\sthose\slines\sto\sexpress\sthe\smaze\smore\sefficiently.\r\n\r\nAlso,\slines\smay\seither\sbe\sspecifying\sa\spositive\sor\snegative\simage,\swhich\sis\sdetermined\sby\sassuming\sthe\sfirst\sstarting\slocation\salways\sis\splaced\son\sempty\sspace.\r\n\r\nThe\sraw\sinteger\sarray\sformat\swould\sbe\scomma\sdelimited\swith\sstandard\sbase\s10\sintegers\swith\sno\sextra\scharacters\sat\sthe\sstart\sor\send\sof\sthe\sarray.\s\sThis\sfollows\sthe\sbasic\scsv\sformat.\r\n\r\nAlso,\swe\smay\sadd\sthe\scapability\sfor\sencoding\sthe\sinteger\sarray\sin\sa\sbase64\sencoding\sand\sback.\s\sThe\sleading\srecommended\sversion\sfor\sthis\sencoding\sactually\sencodes\snumbers\susing\sbase\s32,\sbut\sthe\ssecond\shalf\sof\sbase64\scharacters\shave\sa\sbuilt\sin\sending\sdelimiter.\s\r\n\r\nIt\sis\salso\sproposed\sthat\swe\sallow\sencoding\smultiple\smazes\sin\ssequence\sto\screate\sa\smaze\ssequence.\s\sMultiple\sencoded\smazes\sare\sdelimited\sby\ssemicolons\sin\sboth\sthe\sraw\sarray\snotation\sand\sthe\sbase64\sencoding\s(semicolon\sshould\snot\sbe\sone\sof\sthe\snormal\sencoding\scharacters).\r\n\r\nAlso,\sread\sthe\sabove\sabout\send\sdestinations.\s\sIf\sno\send\sdestinations\sare\sspecified,\sthe\sfirst\sending\slocation\sof\sa\smaze\srefers\sto\sthe\sfirst\sstarting\slocation\sof\sthe\snext\smaze\sin\sthe\ssequence.\s\sStarting\slocation\sindexes\sare\sassigned\ssequentially\sfollowing\sthe\sorder\sof\sthe\smazes.
J severity Critical
J status Open
J title encode\sand\sdecode\sline\sformat
J type Feature_Request
K bc5a45dcf8aaa0279ed30f2c5d2080f61c0b2201
U Derek
Z a47253ec7e421941a454f46252e1b940