Re: LZ: Compression program (and questions for asm programmers)


[Prev][Next][Index][Thread]

Re: LZ: Compression program (and questions for asm programmers)



On Tue, 10 Sep 1996, Scott J. Rein wrote:


> >This method is known as the Lempel-Ziv algorithm.
> 
> That is interesting, thanks.  But how efficient is that with data files that
> are more random?


Lempel-Ziv is very inefficient with pseudo-random data. Here's an
exercise: using whatever graphics program you like, create an image where
every contiguous pixel is a different colour, using a noise filter or
whatever. Save the file in 2 formats - .BMP and .GIF.


Most of the time, the BMP will actually be smaller than the GIF, even
though it is a "raw" bitmap with no compression. This is because the GIF
(which uses an LZW algorithm) is unable to compress most of the
pseudorandom data, and so the tokens actually increase the filesize.


It works well for pictures and text, but not for programs or other
pseudorandom files.


-Isaac




<pre>
--
Isaac Salpeter
the ticalc.org project
isaac@ticalc.org
<pre>
--
</pre>


References: