(index ("z3:encode-init" 0) ("z3:encode" 908) ("z3:decode-init" 1425) ("z3:decode" 1571) ("z3:handle?" 1776) ("z3:encode-buffer" 1920) ("z3:encode-buffer-to-blob" 2185) ("z3:decode-buffer" 2398) ("z3:encode-file" 2676) ("z3:write-encoded" 3383) ("z3:decode-file" 3762) ("z3:read-decoded" 3942) ("z3:file-handle?" 4224) ("z3:file-handle-fileno" 4383) ("z3:open-compressed-input-file" 4538) ("z3:open-compressed-output-file" 4768))
(def (sig (procedure "(z3:encode-init #!key buffer buffer-size tellwhen thrmin thrmax initialgrant preferlonger)" (id z3:encode-init))) (p "Initializes RFC1951 compression of data into a memory buffer. Various keyword arguments can be supplied to control compression:") (dl (dt "buffer") (dd "The target buffer for the compressed data.") (dt "buffer-size") (dd "maximal size of the compressed data.") (dt "tellwhen") (dd "Frequency for code size estimation (0 for none, i.e. full block usage).") (dt "thrmin, thrmax") (dd "Threshold for block close decision.") (dt "initialgrant") (dd "For threshold comparison, all but the first slice are asumed to be incremented by this value to roughly compensate RFC1951 block dynamic table size.") (dt "preferlonger") (dd "When  non-zero,  the  compressor will try to find a longer match at n+1 and prefer it over a previous match at n. ")) (p "Returns a z3 handle."))
(def (sig (procedure "z3:encode Z3HANDLE RECEIVER DATA [LENGTH])" (id z3:encode))) (p "Encode data (a string) into a memory buffer using RFC1951 compression and returns the number of bytes written. If less data has been commpressed than given in the call, invoke " (tt "z3:encode") " repeatedly with the remaining data. Returns " (tt "#f") " when finished. Each time some compressed data is\" available, the one-argument procedure " (tt "RECEIVER") " is called with a string containing a chunk of compressed data."))
(def (sig (procedure "(z3:decode-init)" (id z3:decode-init))) (p "Initialize an in-memory RFC1951 decompression and return a z3 handle for it."))
(def (sig (procedure "(z3:decode Z3HANDLE RECEIVER BUFFER [LENGTH])" (id z3:decode))) (p "Decode the RFC1951 compressed data in " (tt "BUFFER") " (a string) and return the number of bytes decompressed."))
(def (sig (procedure "(z3:handle? X)" (id z3:handle?))) (p "Returns " (tt "#t") " if " (tt "X") " is a z3 handle or " (tt "#f") " otherwise."))
(def (sig (procedure "(z3:encode-buffer STRING [START [END]])" (id z3:encode-buffer))) (p "Encodes the data in " (tt "STRING") " using RFC1951 encoding with optional start- and end-positions. Returns a freshly allocated string that contains the compressed data."))
(def (sig (procedure "(z3:encode-buffer-to-blob STRING [START [END]])" (id z3:encode-buffer-to-blob))) (p "Like " (tt "z3:encode-buffer") ", but returns a freshly-allocated blob containing the compressed data."))
(def (sig (procedure "(z3:decode-buffer STRING [START [END]])" (id z3:decode-buffer))) (p "Decodes the RFC1951 compressed data in " (tt "STRING") " and returns the uncompressed data. Optional start- and end-position may be given. " (tt "STRING") " may be a string or a blob."))
(def (sig (procedure "(z3:encode-file FILENO #!key level filename comment ostype extra)" (id z3:encode-file))) (p "Open a RFC1952 compressed \"gzip\" file (specified by the file-descriptor in " (tt "FILENO") ") for encoded data. The keyword arguments have the following meaning:") (dl (dt "level") (dd "Desired compression-level in the range 1 .. 9, or 0 for selecting the default compression level") (dt "filename") (dd "The name of the file to compress, will be included in the gzip-file header") (dt "comment") (dd "An arbitrary comment") (dt "ostype") (dd "Operating system indicator byte (defaults to -1)") (dt "extra") (dd "Extra data to be encoded in the header\"")) (p "Returns a z3 file-handle."))
(def (sig (procedure "(z3:write-encoded Z3FHANDLE DATA [LENGTH])" (id z3:write-encoded))) (p "Writes " (tt "DATA") " (a string) into a RFC1952 (gzip) compressed file, optionally limited in length.  Before a file has been encoded completely, this procedure must be called once more with " (tt "DATA") " being " (tt "#f") " to indicate that the compression process is finished."))
(def (sig (procedure "(z3:decode-file FILENO)" (id z3:decode-file))) (p "Returns a z3 file-handle for reading the gzip file designated by the file-descriptor " (tt "FILENO") "."))
(def (sig (procedure "(z3:read-decoded Z3FHANDLE [LENGTH])" (id z3:read-decoded))) (p "Reads a chunk of decoded data from a gzip compressed file. The length of the chunk can be given as an optional argument and defaults to 4096 bytes. Returns a string or the end-of-file object."))
(def (sig (procedure "(z3:file-handle? X)" (id z3:file-handle?))) (p "Returns " (tt "#t") " if " (tt "X") " is a z3 file handle or " (tt "#f") " otherwise."))
(def (sig (procedure "(z3:file-handle-fileno Z3FHANDLE)" (id z3:file-handle-fileno))) (p "Returns the file-descriptor associated with a z3 file-handle."))
(def (sig (procedure "(z3:open-compressed-input-file FILENAME)" (id z3:open-compressed-input-file))) (p "Opens a RFC1952 compressed \"gzip\" input file and returns a port that automatically decompresses the data as it is read."))
(def (sig (procedure "(z3:open-compressed-output-file FILENAME #!key level comment ostype extra)" (id z3:open-compressed-output-file))) (p "Creates a RFC1952 compressed \"gzip\" file and returns an output-port. The keyword arguments have the same meaning as for the " (tt "z3:encode-file") " procedure."))
