sig
type bit = Zero | One
type 'a hufftree =
Leaf of 'a
| Node of 'a Huffman.hufftree * 'a Huffman.hufftree
type 'a encoding = Empty | Tree of 'a Huffman.hufftree
val build_tree : 'a list -> 'a Huffman.encoding
val encode : 'a Huffman.hufftree -> 'a list -> Huffman.bit list
val decode : 'a Huffman.hufftree -> Huffman.bit list -> 'a list
end