The huffman Reference Manual

This is the huffman Reference Manual, version 1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:25:06 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 huffman

Huffman encoding and decoding for Common Lisp.

Author

Jeffrey Massung

License

Apache 2.0

Version

1.0

Source

huffman.asd.

Child Component

huffman.lisp (file).


3 Files

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


3.1 Lisp


3.1.1 huffman/huffman.asd

Source

huffman.asd.

Parent Component

huffman (system).

ASDF Systems

huffman.

Packages

huffman-asd.


3.1.2 huffman/huffman.lisp

Source

huffman.asd.

Parent Component

huffman (system).

Packages

huffman.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 huffman-asd

Source

huffman.asd.

Use List
  • asdf/interface.
  • common-lisp.

4.2 huffman

Source

huffman.lisp.

Nickname

huff

Use List

common-lisp.

Public Interface
Internals

5 Definitions

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


5.1 Public Interface


5.1.1 Ordinary functions

Function: huffman-decode (coding)

Decode a bit vector with a Huffman encoding map.

Package

huffman.

Source

huffman.lisp.

Function: huffman-encode (seq &optional map)

Generate a Huffman map of values to bit encodings and encode the sequence.

Package

huffman.

Source

huffman.lisp.

Function: huffman-map-sequence (seq)

Return a hash-table of Huffman codes from a sequence.

Package

huffman.

Source

huffman.lisp.


5.1.2 Generic functions

Generic Reader: huffman-coding-map (object)
Package

huffman.

Methods
Reader Method: huffman-coding-map ((huffman-coding huffman-coding))

automatically generated reader method

Source

huffman.lisp.

Target Slot

map.

Generic Reader: huffman-coding-sequence (object)
Package

huffman.

Methods
Reader Method: huffman-coding-sequence ((huffman-coding huffman-coding))

automatically generated reader method

Source

huffman.lisp.

Target Slot

coding.


5.1.3 Standalone methods

Method: print-object ((obj huffman-coding) stream)

Output a Huffman coding.

Source

huffman.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: copy-node (instance)
Package

huffman.

Source

huffman.lisp.

Function: make-leaf (value &optional count)

Create a Huffman tree leaf node.

Package

huffman.

Source

huffman.lisp.

Function: make-node (&key count leaf value left right)
Package

huffman.

Source

huffman.lisp.

Function: make-root (left right)

Create a Huffman tree root node.

Package

huffman.

Source

huffman.lisp.

Function: make-tree (seq)

Generate a Huffman tree from a sequence of data.

Package

huffman.

Source

huffman.lisp.

Function: map-of-tree (tree)

Return a hash-table mapping of values to bit-vector codes.

Package

huffman.

Source

huffman.lisp.

Reader: node-count (instance)
Writer: (setf node-count) (instance)
Package

huffman.

Source

huffman.lisp.

Target Slot

count.

Reader: node-leaf (instance)
Writer: (setf node-leaf) (instance)
Package

huffman.

Source

huffman.lisp.

Target Slot

leaf.

Reader: node-left (instance)
Writer: (setf node-left) (instance)
Package

huffman.

Source

huffman.lisp.

Target Slot

left.

Function: node-p (object)
Package

huffman.

Source

huffman.lisp.

Reader: node-right (instance)
Writer: (setf node-right) (instance)
Package

huffman.

Source

huffman.lisp.

Target Slot

right.

Reader: node-value (instance)
Writer: (setf node-value) (instance)
Package

huffman.

Source

huffman.lisp.

Target Slot

value.

Function: tree-of-map (map)

Return a binary tree of Huffman codes from a hash map.

Package

huffman.

Source

huffman.lisp.


5.2.2 Generic functions

Generic Reader: huffman-coding-type (object)
Package

huffman.

Methods
Reader Method: huffman-coding-type ((huffman-coding huffman-coding))

automatically generated reader method

Source

huffman.lisp.

Target Slot

type.


5.2.3 Structures

Structure: node

Huffman tree node.

Package

huffman.

Source

huffman.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: count
Package

common-lisp.

Readers

node-count.

Writers

(setf node-count).

Slot: leaf
Readers

node-leaf.

Writers

(setf node-leaf).

Slot: value
Readers

node-value.

Writers

(setf node-value).

Slot: left
Readers

node-left.

Writers

(setf node-left).

Slot: right
Readers

node-right.

Writers

(setf node-right).


5.2.4 Classes

Class: huffman-coding

Return value from huffman-encode.

Package

huffman.

Source

huffman.lisp.

Direct methods
Direct slots
Slot: coding
Initargs

:coding

Readers

huffman-coding-sequence.

Writers

This slot is read-only.

Slot: map
Package

common-lisp.

Initargs

:map

Readers

huffman-coding-map.

Writers

This slot is read-only.

Slot: type
Package

common-lisp.

Initargs

:type

Readers

huffman-coding-type.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   F   G   H   M   N   P   T  
Index Entry  Section

(
(setf node-count): Private ordinary functions
(setf node-leaf): Private ordinary functions
(setf node-left): Private ordinary functions
(setf node-right): Private ordinary functions
(setf node-value): Private ordinary functions

C
copy-node: Private ordinary functions

F
Function, (setf node-count): Private ordinary functions
Function, (setf node-leaf): Private ordinary functions
Function, (setf node-left): Private ordinary functions
Function, (setf node-right): Private ordinary functions
Function, (setf node-value): Private ordinary functions
Function, copy-node: Private ordinary functions
Function, huffman-decode: Public ordinary functions
Function, huffman-encode: Public ordinary functions
Function, huffman-map-sequence: Public ordinary functions
Function, make-leaf: Private ordinary functions
Function, make-node: Private ordinary functions
Function, make-root: Private ordinary functions
Function, make-tree: Private ordinary functions
Function, map-of-tree: Private ordinary functions
Function, node-count: Private ordinary functions
Function, node-leaf: Private ordinary functions
Function, node-left: Private ordinary functions
Function, node-p: Private ordinary functions
Function, node-right: Private ordinary functions
Function, node-value: Private ordinary functions
Function, tree-of-map: Private ordinary functions

G
Generic Function, huffman-coding-map: Public generic functions
Generic Function, huffman-coding-sequence: Public generic functions
Generic Function, huffman-coding-type: Private generic functions

H
huffman-coding-map: Public generic functions
huffman-coding-map: Public generic functions
huffman-coding-sequence: Public generic functions
huffman-coding-sequence: Public generic functions
huffman-coding-type: Private generic functions
huffman-coding-type: Private generic functions
huffman-decode: Public ordinary functions
huffman-encode: Public ordinary functions
huffman-map-sequence: Public ordinary functions

M
make-leaf: Private ordinary functions
make-node: Private ordinary functions
make-root: Private ordinary functions
make-tree: Private ordinary functions
map-of-tree: Private ordinary functions
Method, huffman-coding-map: Public generic functions
Method, huffman-coding-sequence: Public generic functions
Method, huffman-coding-type: Private generic functions
Method, print-object: Public standalone methods

N
node-count: Private ordinary functions
node-leaf: Private ordinary functions
node-left: Private ordinary functions
node-p: Private ordinary functions
node-right: Private ordinary functions
node-value: Private ordinary functions

P
print-object: Public standalone methods

T
tree-of-map: Private ordinary functions