Opened 11 years ago

Closed 11 years ago

#82 closed defect (fixed)

z3 egg DEFLATE and gzip confusion

Reported by: Tony Sidaway Owned by: Tony Sidaway
Priority: minor Milestone:
Component: extensions Version: 4.1.x
Keywords: z3 gzip rfc1951 rfc1952 Cc:
Estimated difficulty:

Description

RFC1951 is the DEFLATE format. RFC1952 is the gzip file format. A gzip file is a data stream encoded using the DEFLATE format, in a file wrapper specified by RFC1952.

Although it is presented as a gzip egg that "Provides functions to read and write compressed data using the gzip algorithm", some of the calls actually use the raw DEFLATE format without being clear about it, resulting in unexpected errors.

Four interfaces are specified by this egg: the raw data interface, the buffer interface, the file system interface and the port interface.

The first two only read and write DEFLATE (RFC1951) format, while the second two read and write gzip (RFC1952) format.

The upshot is that if one reads a gzip file into a buffer and then attempts to use the z3 raw data or buffer interface functions to decode it, an error will result because they do not understand gzip file format.

In the interim, the egg documentation should specify the data formats being handled by each set of functions.

In the long run a buffer interface that handles RFC1952 format in memory would be useful because this format is commonly used, for instance, for data transmission from web servers to clients. At present if a RFC1952 stream is captured in a memory buffer the only way z3 can decode it is by writing to a temporary file and then using the file system or port interface to decode the file contents.

Change History (4)

comment:1 Changed 11 years ago by felix winkelmann

Owner: set to felix winkelmann
Status: newassigned

comment:2 Changed 11 years ago by Tony Sidaway

Owner: changed from felix winkelmann to Tony Sidaway
Status: assignedaccepted

comment:3 Changed 11 years ago by felix winkelmann

Component: build systemextensions

comment:4 Changed 11 years ago by Tony Sidaway

Resolution: fixed
Status: acceptedclosed

z3/trunk/doc.scm edited to clarify RFC1951 and RFC1952

Note: See TracTickets for help on using tickets.