Decompress zlib compressed string?

Dar Scott dsc at swcp.com
Tue May 20 15:53:01 EDT 2003


On Tuesday, May 20, 2003, at 12:47 PM, Trevor DeVore wrote:

> I have some data that I will be reading from part of a file that has 
> been compressed using zlib compression.  Is it possible to decompress 
> this with Revolution or would I need to create my own external?

 From the zlib manual:
The data format used by the zlib library is described by RFCs (Request 
for Comments) 1950 to 1952 in the files rfc1950.txt (zlib format), 
rfc1951.txt (deflate format) and rfc1952.txt (gzip format).

 From the TD entry for decompress:
For technical information about the format used by the compress and 
decompress functions, see RFC 1952 at 
<http://www.ietf.org/rfc/rfc1952.txt>.

Hmmmm.  Maybe.  Give it a try.

(If you have to use the actually zlib library for any reason, you need 
to make an external.  In the general case, you can do any kind of data 
manipulation in Revolution itself if you know the procedure.  These 
built-in functions might be just what you need or get you close.)

Dar Scott




More information about the use-livecode mailing list