PLT MzLib: Libraries Manual Deflating (Compressing) Data

(gzip in-filename [out-filename])      PROCEDURE

Compresses data to the same format as the GNU gzip utility, writing the compressed data directly to a file. The in-filename argument is the name of the file to compress. The default output file name is in-filename with .gz appended. If the file named by out-filename exists, it will be overwritten. The return value is void.

(gzip-through-ports in out orig-filename timestamp)      PROCEDURE

Reads the port in for data and compresses it to out, outputting the same format as the GNU gzip utility. The orig-filename string is embedded in this output; orig-filename can be #f to omit the filename from the compressed stream. The timestamp number is also embedded in the output stream, as the modification date of the original file (in Unix seconds, as file-or-directory-modify-seconds would report under Unix). The return value is void.

(deflate in out)      PROCEDURE

Writes pkzip-format ``deflated'' data to the port out, compressing data from the port in. The data in a file created by gzip uses this format (preceded with some header information). The return value is void.