huffman-1.0.1: Pure Haskell implementation of the Huffman encoding algorithm

Safe HaskellSafe-Infered

Data.Compression.Huffman

Documentation

data HuffmanTree a Source

Constructors

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

Instances

Show a => Show (HuffmanTree a) 

data Bit Source

Constructors

Zero 
One 

Instances

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

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

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