LZW compression

Dar Scott dsc at swcp.com
Sat Jan 3 23:55:39 EST 2004


On Saturday, January 3, 2004, at 09:17 PM, Alejandro Tejada wrote:

>> I have someplace around here a compressZlib()
>> and decompressZlib()function set.
>
> How did your function differs of the build-in
> gzip compress function?

It provides only the core zlib functionality.

>
>> A limitation is that currently decompress requires
>> the size.
>
> Do you refers to the size of the file to compress?

Yes.  Though zlib is for compressing any type of data, not just a file. 
  To decompress with my library, you need to know the size of the data.  
At least, right now, it is needed.

>
>> I was thinking of including this in a library for
>> rounding out Rev's gzip capabilities for getting
>> and setting parameters and to allow an
>> application to claim gzip compliance. Maybe that
>> would be a tiny shareware library or something.
>> It is current sitting on the self, though.
>
> This sounds interesting.
>
> What caracteristics Rev needs to comply with
> the gzip specs?

I don't remember all.  I'll have to check.

A complying application must check the crc, though it may use the data 
even if it is bad.  The Revolution gzip decompress() does not check it. 
  This is right for what it does.  I think this is the way the function 
should be.  However, it does prevent application builders from saying 
that their apps are compliant.

Some of the fields in the compression are not correct and some are 
missing.

As I mentioned, I shelved this and I don't remember much.

Dar Scott



More information about the use-livecode mailing list