Common Lisp Package: SALZA2

README:

FUNCTION

Public

MAKE-STREAM-OUTPUT-CALLBACK (STREAM)

Return a function suitable for use as a compressor callback that writes all compressed data to STREAM.

Undocumented

COMPRESS-DATA (DATA COMPRESSOR-DESIGNATOR &REST INITARGS)

GZIP-FILE (INPUT OUTPUT &KEY (IF-EXISTS SUPERSEDE))

GZIP-STREAM (INPUT OUTPUT)

Private

DISTANCE-CODES

Compute a table of the (code + extra bits) values for all possible distances as specified by RFC1951.

FIXED-HUFFMAN-CODES

Generate the fixed Huffman codes specified by RFC1951.

LENGTH-CODES (HUFFMAN-CODES)

Compute a table of the (Huffman + extra bits) values for all possible lengths for the given HUFFMAN-TABLE.

MATCH-LENGTH (P1 P2 INPUT END)

Returns the length of the match between positions p1 and p2 in INPUT; END is a sentinel position that ends the match length check if reached.

MERGE-INPUT (INPUT START COUNT OUTPUT OFFSET COMPRESS-FUN)

Merge COUNT octets from START of INPUT into OUTPUT at OFFSET; on reaching 32k boundaries within OUTPUT, call the COMPRESS-FUN with OUTPUT, a starting offset, and the count of pending data.

Undocumented

ADLER32-UPDATE (ADLER-HIGH ADLER-LOW BUF START COUNT)

BITSTREAM-CALLBACK-MISSING (&REST ARGS)

CODE-VECTOR (LENGTH)

COMPRESS (INPUT CHAINS START END LITERAL-FUN LENGTH-FUN DISTANCE-FUN)

COMPRESSOR-DESIGNATOR-COMPRESSOR (DESIGNATOR INITARGS)

CRC32 (HIGH LOW BUF START COUNT)

CRC32-TABLE

ERROR-MISSING-CALLBACK (&REST ARGS)

GZIP-WRITE-U32 (VALUE COMPRESSOR)

HASH-VALUE (INPUT POSITION)

LONGEST-MATCH (P1 INPUT CHAINS END MAX-TESTS)

MAKE-CHAINS

MAKE-HASHES

MAKE-HUFFMAN-WRITER (HUFFMAN-CODES BITSTREAM)

MAKE-INPUT

MAKE-OCTET-VECTOR (SIZE)

MERGE-BITS (CODE SIZE BUFFER BITS CALLBACK)

MERGE-OCTET (OCTET BUFFER BITS CALLBACK)

MOD8191 (Z)

OCTET-VECTOR (&REST ELEMENTS)

REINITIALIZE-BITSTREAM-FUNS (COMPRESSOR BITSTREAM)

REVERSE-BITS (WORD N)

SIZE-VECTOR (LENGTH)

UB32-OCTETS (RESULT)

UPDATE-CHAINS (INPUT HASHES CHAINS START COUNT)

MACRO

Public

Undocumented

WITH-COMPRESSOR ((VAR CLASS &REST INITARGS &KEY &ALLOW-OTHER-KEYS) &BODY BODY)

GENERIC-FUNCTION

Public

COMPRESS-OCTET (OCTET COMPRESSOR)

Add OCTET to the compressed data of COMPRESSOR.

COMPRESS-OCTET-VECTOR (VECTOR COMPRESSOR &KEY START END (START 0))

Add the octets of VECTOR to the compressed data of COMPRESSOR.

FINISH-COMPRESSION (COMPRESSOR)

Finish the data format and flush all pending data in the bitstream.

FINISH-DATA-FORMAT (COMPRESSOR)

Add any needed epilogue data to the output bitstream.

PROCESS-INPUT (COMPRESSOR INPUT START COUNT)

Map over pending octets in INPUT and perform any needed processing. Called before the data is compressed. A subclass might use this to compute a checksum of all input data.

RESET (OBJECT)

Restore OBJECT's initial state so it may be re-used.

RESULT (CHECKSUM)

Return the result of CHECKSUM as an integer.

RESULT-OCTETS (CHECKSUM)

Return the result of CHECKSUM as a list of octets, in MSB order.

START-DATA-FORMAT (COMPRESSOR)

Add any needed prologue data to the output bitstream.

UPDATE (CHECKSUM BUFFER START COUNT)

Update the CHECKSUM object with COUNT octets from BUFFER, starting from START.

Undocumented

WRITE-BITS (CODE SIZE BITSTREAM)

WRITE-OCTET (OCTET BITSTREAM)

WRITE-OCTET-VECTOR (VECTOR BITSTREAM &KEY START END (START 0))

Private

FINAL-COMPRESS (COMPRESSOR)

Perform the final compression on pending input data in COMPRESSOR.

MAKE-COMPRESS-FUN (COMPRESSOR)

Create a callback suitable for passing to MERGE-INPUT for performing incremental compression of the next 32k octets of input.

Undocumented

FLUSH (BITSTREAM)

SLOT-ACCESSOR

Public

CALLBACK (OBJECT)

A function of two arguments, BUFFER and END, that should write out all the data in BUFFER up to END.

SETFCALLBACK (NEW-VALUE OBJECT)

A function of two arguments, BUFFER and END, that should write out all the data in BUFFER up to END.

Private

BITS (OBJECT)

The number of bits written to the buffer so far.

SETFBITS (NEW-VALUE OBJECT)

The number of bits written to the buffer so far.

BUFFER (OBJECT)

Holds accumulated bits packed into octets.

SETFBUFFER (NEW-VALUE OBJECT)

Holds accumulated bits packed into octets.

Undocumented

ADLER32 (OBJECT)

SETFADLER32 (NEW-VALUE OBJECT)

BITSTREAM (OBJECT)

SETFBITSTREAM (NEW-VALUE OBJECT)

BYTE-FUN (OBJECT)

SETFBYTE-FUN (NEW-VALUE OBJECT)

CHAINS (OBJECT)

SETFCHAINS (NEW-VALUE OBJECT)

CHECKSUM (OBJECT)

SETFCHECKSUM (NEW-VALUE OBJECT)

CODES (OBJECT)

SETFCODES (NEW-VALUE OBJECT)

COMPRESS-FUN (OBJECT)

SETFCOMPRESS-FUN (NEW-VALUE OBJECT)

COUNTER (OBJECT)

SETFCOUNTER (NEW-VALUE OBJECT)

DATA-LENGTH (OBJECT)

SETFDATA-LENGTH (NEW-VALUE OBJECT)

DISTANCE-FUN (OBJECT)

SETFDISTANCE-FUN (NEW-VALUE OBJECT)

END (OBJECT)

SETFEND (NEW-VALUE OBJECT)

HASHES (OBJECT)

SETFHASHES (NEW-VALUE OBJECT)

HIGH (OBJECT)

SETFHIGH (NEW-VALUE OBJECT)

INPUT (OBJECT)

SETFINPUT (NEW-VALUE OBJECT)

LENGTH-FUN (OBJECT)

SETFLENGTH-FUN (NEW-VALUE OBJECT)

LITERAL-FUN (OBJECT)

SETFLITERAL-FUN (NEW-VALUE OBJECT)

LOW (OBJECT)

SETFLOW (NEW-VALUE OBJECT)

OCTET-BUFFER (OBJECT)

SETFOCTET-BUFFER (NEW-VALUE OBJECT)

SIZES (OBJECT)

SETFSIZES (NEW-VALUE OBJECT)

START (OBJECT)

SETFSTART (NEW-VALUE OBJECT)

VARIABLE

Private

*GZIP-SIGNATURE*

These two octets precede all data in the gzip format.

Undocumented

*CRC32-TABLE*

*DISTANCE-CODES*

*FIXED-HUFFMAN-CODES*

*LENGTH-CODES*

+BITSTREAM-BUFFER-BITMASK+

+BITSTREAM-BUFFER-BITS+

+BITSTREAM-BUFFER-MASK+

+BITSTREAM-BUFFER-SIZE+

+BUFFER-SIZE+

+BUFFER-SIZE-MASK+

+HASHES-SIZE+

+INPUT-LIMIT+

+INPUT-LIMIT-MASK+

+INPUT-MASK+

+INPUT-SIZE+

+RADIX+

+RMAX+

CLASS

Public

Undocumented

ADLER32-CHECKSUM

CRC32-CHECKSUM

DEFLATE-COMPRESSOR

GZIP-COMPRESSOR

ZLIB-COMPRESSOR

Private

Undocumented

BITSTREAM (OBJECT)

CHECKSUM (OBJECT)

HUFFMAN-CODES

CONSTANT

Private

+GZIP-FAST-COMPRESSION+

Code for gzip compression level. This is present only to create valid gzip data; it has no meaning to the compressor and is only a hint to the decompressor.

+MAXIMUM-MATCH-DISTANCE+

The maximum distance for a match.

+MAXIMUM-MATCH-LENGTH+

The maximum match length allowed.

Undocumented

+ADLER32-BASE+

+FINAL-BLOCK+

+FIXED-TABLES+

+GZIP-DEFLATE-COMPRESSION+

+GZIP-FLAGS+

+GZIP-MTIME+

+GZIP-UNIX-OS+