Re: compression beta, and BIG bitmaps

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Sat, 23 Feb 2002 16:19:34 -0600, Kat <gertie at PELL.NET> wrote:

>Sounds like we need more and more an option to eliminate that 4byte 
>package for special defines, Rob. Even if it's 2bytes, that saves some of us 
>100's of megs of memory. How about a way to "include" the included file that 
>loads these big files? If the "include as" syntax knows more about the 
>contents of the vars and procedures in that file,, can the var tags be reduced 
>to 2 bytes? 

You can always squeeze 3 bytes into each entry with ((a*256)+b)*256+c,
though obviously that means you have to unpack them before use.
If you download Mike's editor from the archives that contains
analyse.e which manages to pack four "eu-chars" into a single integer.
If there were any bugs in that code the editor would crash and burn
all the time, and it don't. Performance hit is < 5 seconds to load a
673K file, not bad - and presumably saves about 2MB of memory.

Pete

PS This is an "eu-char":
global function TextToAnalysedLine(sequence line) -- analyse text line
to an intermediate state
-- suitable for storing (compressing). Newline chars not allowed
-- result is a 1-d eu_char SEQUENCE with indici for keywords &
builtins &  comments
-- plus tab is remapped

-- 1-24		index for keywords
-- 25-29	[unused]
-- 30		comment indicator
-- 31		re-mapped TAB
-- 32-127	ascii chars
-- 128-214	index for builtin routines - some excess space is here to
absorb future additions

To get 4 bytes into an integer, they must be 0..214 not 0..255.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu