This is z3.egg.info, produced by makeinfo version 4.7 from
eggdoc-output.texi.

INFO-DIR-SECTION The Algorithmic Language Scheme
START-INFO-DIR-ENTRY
* z3.egg: (z3.egg).		A gzip (RFC1951 + RFC1952) compression and decompression library
END-INFO-DIR-ENTRY


File: z3.egg.info,  Node: Top,  Next: About this egg,  Up: (dir)

z3 egg
******

A gzip (RFC1951 + RFC1952) compression and decompression library

Written by Oskar Schirmer

   This manual corresponds to version 1.32 of the z3 extension library
for Chicken Scheme.

* Menu:

* About this egg::
* Documentation::
* Index::


File: z3.egg.info,  Node: About this egg,  Next: Documentation,  Prev: Top,  Up: Top

1 About this egg
****************

* Menu:

* Version history::
* Usage::


File: z3.egg.info,  Node: Version history,  Next: Usage,  Up: About this egg

1.1 Version history
===================

`1.32'
     Fixed bug in z3lib code, related to 64-bit architectures

`1.31'
     Fixed bug in `z3:encode'

`0.9'
     Initial release


File: z3.egg.info,  Node: Usage,  Prev: Version history,  Up: About this egg

1.2 Usage
=========

Load this egg like so:

   `(require-extension z3)'


File: z3.egg.info,  Node: Documentation,  Next: Index,  Prev: About this egg,  Up: Top

2 Documentation
***************

Provides functions to read and write compressed data using the gzip
algorithm. This extension includes code from Oskar Schirmers excellent
z3lib (http://scara.com/~schirmer/o/z3lib/)library.

   Errors occurring in inflation/deflation procedures will result in a
composite condition of the kinds `exn' and `z3'.

* Menu:

* Raw data interface::
* File-system interface::
* Port interface::


File: z3.egg.info,  Node: Raw data interface,  Next: File-system interface,  Up: Documentation

2.1 Raw data interface
======================

 -- procedure: z3:encode-init
          (z3:encode-init #!key buffer buffer-size tellwhen thrmin thrmax initialgrant preferlonger)

     Initializes compression of data into a memory buffer. Various
     keyword arguments can be supplied to control compression:

    buffer
          The target buffer for the compressed data

    buffer-size
          maximal size of the compressed data

    tellwhen
          Frequency for code size estimation (0 for none, i.e. full
          block usage)

    thrmin, thrmax
          Threshold for block close decision

    initialgrant
          For threshold comparison, all but the first slice are asumed
          to be incremented by this value to roughly compensate RFC1951
          block dynamic table size

    preferlonger
          When  non-zero,  the  compressor will try to find a longer
          match at  n+1 and prefer it over a previous match at n

     Returns a z3 handle.

 -- procedure: z3:encode
          (z3:encode Z3HANDLE RECEIVER DATA [LENGTH])

     Encode data (a string) into a memory buffer and returns the number
     of bytes written. If less data has been commpressed than given in
     the call, invoke `z3:encode' repeatedly with the remaining data.
     Returns `#f' when finished. Each time some compressed data is
     available, the one-argument procedure `RECEIVER' is called with a
     string containing a chunk of compressed data.

 -- procedure: z3:decode-init
          (z3:decode-init)

     Initialize an in-memory decompression and return a z3 handle for
     it.

 -- procedure: z3:decode
          (z3:decode Z3HANDLE RECEIVER BUFFER [LENGTH])

     Decode the compressed data in `BUFFER' (a string) and return the
     number of bytes decompressed.

 -- procedure: z3:handle?
          (z3:handle? X)

     Returns `#t' if `X' is a z3 handle or `#f' otherwise.


File: z3.egg.info,  Node: File-system interface,  Next: Port interface,  Prev: Raw data interface,  Up: Documentation

2.2 File-system interface
=========================

 -- procedure: z3:encode-file
          (z3:encode-file FILENO #!key level filename comment ostype extra)

     Open a compressed file (specified by the file-descriptor in
     `FILENO') for encoded data. The keyword arguments have the
     following meaning:

    level
          Desired compression-level in the range 1 .. 9, or 0 for
          selecting the default compression level

    filename
          The name of the file to compress, will be included in the
          gzip-file header

    comment
          An arbitrary comment

    ostype
          Operating system indicator byte (defaults to -1)

    extra
          Extra data to be encoded in the header

     Returns a z3 file-handle.

 -- procedure: z3:write-encoded
          (z3:write-encoded Z3FHANDLE DATA [LENGTH])

     Writes `DATA' (a string) into a compressed file, optionally
     limited in length. Before a file has been encoded completely, this
     procedure must be called once more with `DATA' being `#f' to
     indicate that the compression process is finished.

 -- procedure: z3:decode-file
          (z3:decode-file FILENO)

     Returns a z3 file-handle for reading the file designated by the
     file-descriptor `FILENO'.

 -- procedure: z3:read-decoded
          (z3:read-decoded Z3FHANDLE [LENGTH])

     Reads a chunk of decoded data from a 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.

 -- procedure: z3:file-handle?
          (z3:file-handle? X)

     Returns `#t' if `X' is a z3 file handle or `#f' otherwise.

 -- procedure: z3:file-handle-fileno
          (z3:file-handle-fileno Z3FHANDLE)

     Returns the file-descriptor associated with a z3 file-handle.


File: z3.egg.info,  Node: Port interface,  Prev: File-system interface,  Up: Documentation

2.3 Port interface
==================

 -- procedure: z3:open-compressed-input-file
          (z3:open-compressed-input-file FILENAME)

     Opens a compressed input file and returns a port that
     automatically decompresses the data as it is read.

 -- procedure: z3:open-compressed-output-file
          (z3:open-compressed-output-file FILENAME #!key level comment ostype extra)

     Creates a compressed file and returns an output-port. The keyword
     arguments have the same meaning as for the `z3:encode-file'
     procedure.


File: z3.egg.info,  Node: Index,  Prev: Documentation,  Up: Top

Index
*****

 [index ]
* Menu:

* z3:decode:                             Raw data interface.   (line 53)
* z3:decode-file:                        File-system interface.
                                                               (line 41)
* z3:decode-init:                        Raw data interface.   (line 47)
* z3:encode:                             Raw data interface.   (line 37)
* z3:encode-file:                        File-system interface.
                                                               (line  7)
* z3:encode-init:                        Raw data interface.   (line  7)
* z3:file-handle-fileno:                 File-system interface.
                                                               (line 59)
* z3:file-handle?:                       File-system interface.
                                                               (line 54)
* z3:handle?:                            Raw data interface.   (line 59)
* z3:open-compressed-input-file:         Port interface.       (line  7)
* z3:open-compressed-output-file:        Port interface.       (line 13)
* z3:read-decoded:                       File-system interface.
                                                               (line 47)
* z3:write-encoded:                      File-system interface.
                                                               (line 33)



Tag Table:
Node: Top256
Node: About this egg581
Node: Version history744
Node: Usage1001
Node: Documentation1155
Node: Raw data interface1669
Node: File-system interface3670
Node: Port interface5619
Node: Index6250

End Tag Table
