[][src]Module huff_coding::comp

Example compression/decompression functions using the HuffTree struct.

Modules

errors

Errors returned in the comp module's code.

Structs

CompressData

Data representing a slice of letters (types implementing HuffLetter) compressed into bytes by the compress or compress_with_tree function.

Functions

compress

Compress the provided slice of letters (types implementing HuffLetter), using binary codes generated with a HuffTree struct, into a byte slice (returned with additional data in the form of CompressData).

compress_with_tree

Compress the provided slice of letters (types implementing HuffLetter), using binary codes generated with the provided HuffTree struct, into a byte slice (returned with additional data in the form of CompressData).

decompress

Decompress the provided CompressData<L> into a Vec<L>.