The zlib Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The zlib Reference Manual

This is the zlib Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Tue Feb 20 09:32:30 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

zlib

What

It's a Common Lisp zlib implementation (i.e. it's not using FFI).

Maintainer and Project Home

The package was abandoned and then taken over by github.com/sharplispers.


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 zlib

Source

zlib.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 zlib.asd

Location

zlib.asd

Systems

zlib (system)

Packages

zlib-system


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 zlib/package.lisp

Parent

zlib (system)

Location

package.lisp

Packages

zlib


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 zlib/zlib.lisp

Parent

zlib (system)

Location

zlib.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 zlib-system

Source

zlib.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 zlib

Source

package.lisp (file)

Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: compress BUFFER BTYPE

Compresses BUFFER using deflate algorithm of type BTYPE. Recognized types are :NO-COMPRESSION, :FIXED and :DYNAMIC.

Package

zlib

Source

zlib.lisp (file)

Function: uncompress BUFFER &key UNCOMPRESSED-SIZE OUTPUT-BUFFER START END

Uncompresses BUFFER. Returns a vector of bytes containing the uncompressed data, and the length of the uncompressed data.
UNCOMPRESSED-SIZE is a hint to set the result buffer size.
If UNCOMPRESSED-SIZE is not specified it is set as double of comressed BUFFER size.
If OUTPUT-BUFFER is specified, the result will be written to this buffer, and the UNCOMPRESSED-SIZE is ignored.
Otherwise (default) a new array will be created of size UNCOMPRESSED-SIZE START specifies the start position in the BUFFER (0 by default)
END specifies the end position in the BUFFER (length of BUFFER by default)

Package

zlib

Source

zlib.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +adler-base+
Package

zlib

Source

zlib.lisp (file)

Constant: +deflate-max-hash-table-contents-length+
Package

zlib

Source

zlib.lisp (file)

Constant: +huffman-end-of-block-symbol+
Package

zlib

Source

zlib.lisp (file)

Constant: +max-distance+
Package

zlib

Source

zlib.lisp (file)

Constant: +max-length+
Package

zlib

Source

zlib.lisp (file)

Constant: +max-non-compressed-block-size+
Package

zlib

Source

zlib.lisp (file)

Constant: +min-distance+
Package

zlib

Source

zlib.lisp (file)

Constant: +min-length+
Package

zlib

Source

zlib.lisp (file)

Constant: +zlib-major-version+
Package

zlib

Source

zlib.lisp (file)

Constant: +zlib-minor-version+
Package

zlib

Source

zlib.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Special variables

Special Variable: *debug-level*
Package

zlib

Source

zlib.lisp (file)

Special Variable: *debug-stream*
Package

zlib

Source

zlib.lisp (file)

Special Variable: +distance-encoding+

Gives the relationship between a code, and extra bits and distance

Package

zlib

Source

zlib.lisp (file)

Special Variable: +dynamic-huffman-code-lengths-order+
Package

zlib

Source

zlib.lisp (file)

Special Variable: +fixed-huffman-code-bitlist+
Package

zlib

Source

zlib.lisp (file)

Special Variable: +fixed-huffman-code-lengths+

The number of bits used to represent a code length

Package

zlib

Source

zlib.lisp (file)

Special Variable: +fixed-huffman-codes+
Package

zlib

Source

zlib.lisp (file)

Special Variable: +length-encoding+

Gives the relationship between a code, and extra bits and length

Package

zlib

Source

zlib.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Macros

Macro: debug-format-1 &body BODY
Package

zlib

Source

zlib.lisp (file)

Macro: debug-format-2 &body BODY
Package

zlib

Source

zlib.lisp (file)

Macro: decision-tree EXPRESSION &rest CLAUSES

CLAUSES: Each clause is of the forms:
(less|:less . <body>) ; must be the first clause if present. (<real> . <body>)
DO: Evaluate the expression, which must be a real,
and generate a binary decision tree to select the <body> of the clause whose limit is <= the expression and
the next clause limit is > the expression.

Package

zlib

Source

zlib.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Functions

Function: add-hash-value HASH-TABLE HASH-VALUE INDEX

Remove oldest hash-value index from HASH-TABLE (if necessary) and push INDEX into HASH-TABLE

Package

zlib

Source

zlib.lisp (file)

Function: adler-32 BUFFER

Compute Adler-32 checksum of BUFFER. Based on the sample code in appendix C of RFC 1950. update-adler-32 does all the work

Package

zlib

Source

zlib.lisp (file)

Function: bit-list-from-value VALUE LENGTH

Return a list with a bit representation of VALUE. The list has LENGTH elements

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-bytes INSTANCE
Function: (setf bit-stream-bytes) VALUE INSTANCE
Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-p OBJECT
Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-pad-to-byte-boundary BIT-STREAM

If necessary, pads the current byte in BIT-STREAM with zeroes

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-position INSTANCE
Function: (setf bit-stream-position) VALUE INSTANCE
Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-read-bit BIT-STREAM

Return the next bit from BIT-STREAM

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-read-bits BIT-STREAM N

Read N bits from BIT-STREAM

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-read-byte BIT-STREAM

Read the next byte (8 bits) from BIT-STREAM

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-read-length-and-distance BIT-STREAM CODE &optional DISTANCE-HUFFMAN-TREE

Find the length and distance for CODE from BIT-STREAM and return them

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-read-n-bytes BIT-STREAM N

Read N bytes from BIT-STREAM

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-read-reversed-bit BIT-STREAM
Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-read-reversed-bits BIT-STREAM N
Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-read-symbol BIT-STREAM HUFFMAN-TREE

Read bits from BIT-STREAM and find the corresponding symbol in HUFFMAN-TREE

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-write-bit BIT-STREAM BIT

Write BIT to BIT-STREAM

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-write-bits BIT-STREAM BIT-LIST

Write bits from BIT-LIST to BIT-STREAM

Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-write-bits2 BIT-STREAM BIT-VECTOR
Package

zlib

Source

zlib.lisp (file)

Function: bit-stream-write-byte BIT-STREAM BYTE

Write BYTE to BIT-STREAM

Package

zlib

Source

zlib.lisp (file)

Function: bit-vector-from-value VALUE LENGTH
Package

zlib

Source

zlib.lisp (file)

Function: copy-bit-stream INSTANCE
Package

zlib

Source

zlib.lisp (file)

Function: decode-dynamic-huffman-block ()

Decode one block in BIT-STREAM with dynamic Huffman coding and store the result in RESULT

Package

zlib

Source

zlib.lisp (file)

Function: decode-fixed-huffman-block BIT-STREAM RESULT

Decode one block in BIT-STREAM with fixed Huffman coding and store the result in RESULT.

Package

zlib

Source

zlib.lisp (file)

Function: decode-non-compressed-block BIT-STREAM RESULT

Decode one non-compressed block in BIT-STREAM and store the result in RESULT

Package

zlib

Source

zlib.lisp (file)

Function: distance-code DISTANCE

Return the distance-code for a given DISTANCE

Package

zlib

Source

zlib.lisp (file)

Function: distance-code-bits CODE

Return a list with 5 elements that are the binary representation of CODE.

Package

zlib

Source

zlib.lisp (file)

Function: distance-code-bits2 CODE
Package

zlib

Source

zlib.lisp (file)

Function: encode-dynamic-huffman-block BIT-STREAM BUFFER
Package

zlib

Source

zlib.lisp (file)

Function: encode-fixed-huffman-block BIT-STREAM BUFFER HASH-TABLE START END

Encode a DEFLATE block using the fixed Huffman code method

Package

zlib

Source

zlib.lisp (file)

Function: encode-non-compressed-block BIT-STREAM BUFFER START END

Encode a DEFLATE block using the non-compressing method

Package

zlib

Source

zlib.lisp (file)

Function: extra-distance-bits DISTANCE

The number of extra distance bits that are needed for a given DISTANCE.

Package

zlib

Source

zlib.lisp (file)

Function: extra-length-bits LENGTH

The number of extra length bits that are needed for a given DISTANCE.

Package

zlib

Source

zlib.lisp (file)

Function: find-best-match BUFFER MATCH INDEX

Searches all elements in MATCH to find the one with the lowest position. INDEX is the index to the current position in BUFFER

Package

zlib

Source

zlib.lisp (file)

Function: fixed-huffman-code SYMBOL

Return the code for the given SYMBOL.

Package

zlib

Source

zlib.lisp (file)

Function: fixed-huffman-code2 SYMBOL
Package

zlib

Source

zlib.lisp (file)

Function: huffman-insert-element TREE LENGTH CODE SYMBOL

Insert SYMBOL into TREE

Package

zlib

Source

zlib.lisp (file)

Function: infix-to-tree SEQUENCE
Package

zlib

Source

zlib.lisp (file)

Function: length-code LENGTH

Return the length-code for a given LENGTH

Package

zlib

Source

zlib.lisp (file)

Function: make-bit-stream &key (BYTES BYTES) (POSITION POSITION)
Package

zlib

Source

zlib.lisp (file)

Function: make-huffman-tree HUFFMAN-CODE-LENGTHS

Create a Huffman tree from HUFFMAN-CODE-LENGTHS

Package

zlib

Source

zlib.lisp (file)

Function: map-tree-postfix FUN TREE
Package

zlib

Source

zlib.lisp (file)

Function: number-of-blocks BUFFER BTYPE

Return the number of blocks that should be used to encode the BUFFER.

Package

zlib

Source

zlib.lisp (file)

Function: read-32-bits-from-array ARRAY &optional START

Read a 32-bit word from ARRAY, MSB first starting from position START

Package

zlib

Source

zlib.lisp (file)

Function: read-huffman-code-lengths BIT-STREAM HUFFMAN-TREE ITEMS
Package

zlib

Source

zlib.lisp (file)

Function: update-adler-32 ADLER BUFFER
Package

zlib

Source

zlib.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Structures

Structure: bit-stream ()
Package

zlib

Source

zlib.lisp (file)

Direct superclasses

structure-object (structure)

Direct slots
Slot: bytes
Readers

bit-stream-bytes (function)

Writers

(setf bit-stream-bytes) (function)

Slot: position
Type

fixnum

Initform

0

Readers

bit-stream-position (function)

Writers

(setf bit-stream-position) (function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   Z  
Index Entry  Section

F
File, Lisp, zlib.asd: The zlib<dot>asd file
File, Lisp, zlib/package.lisp: The zlib/package<dot>lisp file
File, Lisp, zlib/zlib.lisp: The zlib/zlib<dot>lisp file

L
Lisp File, zlib.asd: The zlib<dot>asd file
Lisp File, zlib/package.lisp: The zlib/package<dot>lisp file
Lisp File, zlib/zlib.lisp: The zlib/zlib<dot>lisp file

Z
zlib.asd: The zlib<dot>asd file
zlib/package.lisp: The zlib/package<dot>lisp file
zlib/zlib.lisp: The zlib/zlib<dot>lisp file

Jump to:   F   L   Z  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   B   C   D   E   F   H   I   L   M   N   R   U  
Index Entry  Section

(
(setf bit-stream-bytes): Internal functions
(setf bit-stream-position): Internal functions

A
add-hash-value: Internal functions
adler-32: Internal functions

B
bit-list-from-value: Internal functions
bit-stream-bytes: Internal functions
bit-stream-p: Internal functions
bit-stream-pad-to-byte-boundary: Internal functions
bit-stream-position: Internal functions
bit-stream-read-bit: Internal functions
bit-stream-read-bits: Internal functions
bit-stream-read-byte: Internal functions
bit-stream-read-length-and-distance: Internal functions
bit-stream-read-n-bytes: Internal functions
bit-stream-read-reversed-bit: Internal functions
bit-stream-read-reversed-bits: Internal functions
bit-stream-read-symbol: Internal functions
bit-stream-write-bit: Internal functions
bit-stream-write-bits: Internal functions
bit-stream-write-bits2: Internal functions
bit-stream-write-byte: Internal functions
bit-vector-from-value: Internal functions

C
compress: Exported functions
copy-bit-stream: Internal functions

D
debug-format-1: Internal macros
debug-format-2: Internal macros
decision-tree: Internal macros
decode-dynamic-huffman-block: Internal functions
decode-fixed-huffman-block: Internal functions
decode-non-compressed-block: Internal functions
distance-code: Internal functions
distance-code-bits: Internal functions
distance-code-bits2: Internal functions

E
encode-dynamic-huffman-block: Internal functions
encode-fixed-huffman-block: Internal functions
encode-non-compressed-block: Internal functions
extra-distance-bits: Internal functions
extra-length-bits: Internal functions

F
find-best-match: Internal functions
fixed-huffman-code: Internal functions
fixed-huffman-code2: Internal functions
Function, (setf bit-stream-bytes): Internal functions
Function, (setf bit-stream-position): Internal functions
Function, add-hash-value: Internal functions
Function, adler-32: Internal functions
Function, bit-list-from-value: Internal functions
Function, bit-stream-bytes: Internal functions
Function, bit-stream-p: Internal functions
Function, bit-stream-pad-to-byte-boundary: Internal functions
Function, bit-stream-position: Internal functions
Function, bit-stream-read-bit: Internal functions
Function, bit-stream-read-bits: Internal functions
Function, bit-stream-read-byte: Internal functions
Function, bit-stream-read-length-and-distance: Internal functions
Function, bit-stream-read-n-bytes: Internal functions
Function, bit-stream-read-reversed-bit: Internal functions
Function, bit-stream-read-reversed-bits: Internal functions
Function, bit-stream-read-symbol: Internal functions
Function, bit-stream-write-bit: Internal functions
Function, bit-stream-write-bits: Internal functions
Function, bit-stream-write-bits2: Internal functions
Function, bit-stream-write-byte: Internal functions
Function, bit-vector-from-value: Internal functions
Function, compress: Exported functions
Function, copy-bit-stream: Internal functions
Function, decode-dynamic-huffman-block: Internal functions
Function, decode-fixed-huffman-block: Internal functions
Function, decode-non-compressed-block: Internal functions
Function, distance-code: Internal functions
Function, distance-code-bits: Internal functions
Function, distance-code-bits2: Internal functions
Function, encode-dynamic-huffman-block: Internal functions
Function, encode-fixed-huffman-block: Internal functions
Function, encode-non-compressed-block: Internal functions
Function, extra-distance-bits: Internal functions
Function, extra-length-bits: Internal functions
Function, find-best-match: Internal functions
Function, fixed-huffman-code: Internal functions
Function, fixed-huffman-code2: Internal functions
Function, huffman-insert-element: Internal functions
Function, infix-to-tree: Internal functions
Function, length-code: Internal functions
Function, make-bit-stream: Internal functions
Function, make-huffman-tree: Internal functions
Function, map-tree-postfix: Internal functions
Function, number-of-blocks: Internal functions
Function, read-32-bits-from-array: Internal functions
Function, read-huffman-code-lengths: Internal functions
Function, uncompress: Exported functions
Function, update-adler-32: Internal functions

H
huffman-insert-element: Internal functions

I
infix-to-tree: Internal functions

L
length-code: Internal functions

M
Macro, debug-format-1: Internal macros
Macro, debug-format-2: Internal macros
Macro, decision-tree: Internal macros
make-bit-stream: Internal functions
make-huffman-tree: Internal functions
map-tree-postfix: Internal functions

N
number-of-blocks: Internal functions

R
read-32-bits-from-array: Internal functions
read-huffman-code-lengths: Internal functions

U
uncompress: Exported functions
update-adler-32: Internal functions

Jump to:   (  
A   B   C   D   E   F   H   I   L   M   N   R   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *   +  
B   C   P   S  
Index Entry  Section

*
*debug-level*: Internal special variables
*debug-stream*: Internal special variables

+
+adler-base+: Internal constants
+deflate-max-hash-table-contents-length+: Internal constants
+distance-encoding+: Internal special variables
+dynamic-huffman-code-lengths-order+: Internal special variables
+fixed-huffman-code-bitlist+: Internal special variables
+fixed-huffman-code-lengths+: Internal special variables
+fixed-huffman-codes+: Internal special variables
+huffman-end-of-block-symbol+: Internal constants
+length-encoding+: Internal special variables
+max-distance+: Internal constants
+max-length+: Internal constants
+max-non-compressed-block-size+: Internal constants
+min-distance+: Internal constants
+min-length+: Internal constants
+zlib-major-version+: Internal constants
+zlib-minor-version+: Internal constants

B
bytes: Internal structures

C
Constant, +adler-base+: Internal constants
Constant, +deflate-max-hash-table-contents-length+: Internal constants
Constant, +huffman-end-of-block-symbol+: Internal constants
Constant, +max-distance+: Internal constants
Constant, +max-length+: Internal constants
Constant, +max-non-compressed-block-size+: Internal constants
Constant, +min-distance+: Internal constants
Constant, +min-length+: Internal constants
Constant, +zlib-major-version+: Internal constants
Constant, +zlib-minor-version+: Internal constants

P
position: Internal structures

S
Slot, bytes: Internal structures
Slot, position: Internal structures
Special Variable, *debug-level*: Internal special variables
Special Variable, *debug-stream*: Internal special variables
Special Variable, +distance-encoding+: Internal special variables
Special Variable, +dynamic-huffman-code-lengths-order+: Internal special variables
Special Variable, +fixed-huffman-code-bitlist+: Internal special variables
Special Variable, +fixed-huffman-code-lengths+: Internal special variables
Special Variable, +fixed-huffman-codes+: Internal special variables
Special Variable, +length-encoding+: Internal special variables

Jump to:   *   +  
B   C   P   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   B   P   S   Z  
Index Entry  Section

B
bit-stream: Internal structures

P
Package, zlib: The zlib package
Package, zlib-system: The zlib-system package

S
Structure, bit-stream: Internal structures
System, zlib: The zlib system

Z
zlib: The zlib system
zlib: The zlib package
zlib-system: The zlib-system package

Jump to:   B   P   S   Z