module Huffman_coding:sig
..end
type
t =
| |
Leaf of |
||||||
| |
Node of |
val weight : t -> int
module NodeMinHeap:Binary_heap.BinaryHeap
(
sig
end
)
val frequency : string -> (char, int) Stdlib.Hashtbl.t
val code_tree : string -> t
val build_dictionary : t -> (char * int list) list
val encode : string -> (char * 'a list) list -> 'a list
val decode : t -> int list -> char list