On Dec 19, 5:10 pm, "D. Stussy" <
spam+newsgro...@bde-arc.ampr.org>
wrote:
> LZW is hardly new. Its original form was published in 1978.
>
I didn't say it clearly: by "new technque," I mean one I created
myself. LZW is simply a technique I was using alongside the new
technique.
> The idea of compression is to identify repeating patterns and represent
> them using fewer bits while non-repeating values get more bits. When there
> are more repeating patterns than not, the reduction in bits used overall
> decreases, thus causing the benefit. With small input, there's not enough
> repeating data to make this economical, and often the compression
> transformation may increase the size of the data.
>
That's tue. I've ben looking a long time for such an approach with
limited success. I recently found one that works well, but not on its
own. It seems to work well on .zip and .rar files, though. :) Now,
I just have to implement Huffman code or arithmetic coding based on
compession envionment or, if possible, user option.
> There is one difference from the published algorith that may help: The
> algorithm specifies that it should reset its transformation codebook once
> it fills. That prematurely resets the stream. Delaying a reset until the
> codebook overflows (i.e. one entry more) is more useful, as existing
> repeating patterns in the data at the point of fill can be absorbed into
> the existing compression segment (where otherise, they would start a new
> segment at the cost of lost efficiency). This modification is what the
> early 1990's DOS program "LHARC.EXE" did.
Use a sliding dictionary. Got it.