huffman-1.0.2: Pure Haskell implementation of the Huffman encoding algorithm
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Compression.Huffman

Documentation

data HuffmanTree a Source #

Constructors

Empty 
Node (HuffmanTree a) (HuffmanTree a) 
Leaf a 

Instances

Instances details
Show a => Show (HuffmanTree a) Source # 
Instance details

Defined in Data.Compression.Huffman

data Bit Source #

Constructors

Zero 
One 

Instances

Instances details
Show Bit Source # 
Instance details

Defined in Data.Compression.Huffman

Methods

showsPrec :: Int -> Bit -> ShowS #

show :: Bit -> String #

showList :: [Bit] -> ShowS #

type Code a = [(a, [Bit])] Source #

huffman :: (Ord w, Num w) => [(a, w)] -> HuffmanTree a Source #

huffmanSorted :: (Ord w, Num w) => [(a, w)] -> HuffmanTree a Source #

ppCode :: Show a => Code a -> String Source #