(weinholt compression gzip) library provides a custom
input port for reading GZIP compressed data.
A word of warning: the current implementation uses an internal buffer that can grow big when reading specially crafted data.
The GZIP format can support multiple compression methods, but only DEFLATE'd data is supported in this library.
Takes a filename or a binary input port and returns true if the file looks like a GZIP file. The port should have
Returns a new port that can be used to read decompressed GZIP data from the binary-input-port. The id is the name of the returned port.
If close-underlying-port? is true then at the end of the GZIP stream the binary-input-port will be closed.
Opens the file specified by filename and returns a binary input port that decompresses the file on-the-fly.
Reads compressed data from binary-input-port and writes the decompressed data to binary-output-port. Returns a list of gzip headers, one for each gzip member of the file (gzip files can be concatenated).
Reads a GZIP header from binary-input-port and performs sanity checks.
See RFC 1952 for a full description of the following values. Updates are available at http://www.gzip.org/format.txt.
True if the uncompressed data associated with hdr is believed to be text.
The file's modification time as an SRFI-19 date or
#fis none is available.
An “extra field” which some systems use to encode additional file attributes. This is an unparsed bytevector.
fastestor an integer (probably denoting a different compression setting).
The id number of the operating system that created the file. It is e.g. 0 for DOS, 1 for Amiga, 2 for VMS, 3 for Unix.
(0 0)– Initial version.
(1 0)– GZIP headers are returned as a record type.
extract-gzipreturns a list of headers.