View Source huffman (divingbells v0.0.1-alpha.1)
Huffman code tree builder, bit encoder and header generator.
Module to handle all huffman coding. Compress or decompress a bitstring, can be configured through a list of tuples.Summary
Types
Functions
-spec '_compress'(Bits, Config) -> {ok, CompressedBits} | {error, Reason} when Bits :: bitstring(), Config :: list(), CompressedBits :: bitstring(), Reason :: term().
Compress some arbitrary bits.
CompressBits with configuration (WIP) Config Return {ok, CompressedBits} Throws {error, Reason} if any error aries.See also: compress/2.
-spec '_decompress'(Bits, Config) -> {ok, List} | {error, Reason} when Bits :: bitstring(), Config :: list(), List :: list(), Reason :: term().
Deompress bits, with some configuration.
DecoompressBits with configuration (WIP) Config. Return {ok, List} where List is the decompressed data. Throws {error, Reason} if any error aries.See also: decompress/2, decompress_char/2.