package huffman

  1. Overview
  2. Docs
An OCaml library to manipulate Huffman trees

Install

Dune Dependency

Authors

Maintainers

Sources

huffman-v0.1.2.tbz
sha256=a536b694486748bfa9ec05af060c29f799f7ecbb535003343fe812fce8ffa72d
sha512=7dd6208873bd42aefe84ef59ae741017d364bd7fc302616f7131015c8b13968ac56e8a57639060ac115a729d46a834b87988872ea1bc2111e906e89efe8d2cb8

doc/index.html

Huffman index

This package provides a simple way to generate Huffman trees based on the description of an emitter.

Example

  open Huffman
  (* A simple emitter capable to emit characters 'a' 'b' or 'c' with frequencies .1, .2 and .7 *)
  let emitter = ['a',0.1; 'b',0.2; 'c',0.7]
  let _ = emitter |> huffman |> dump_as_dot "test.dot"

Library huffman

The entry point of this library is the module: Huffman.

OCaml

Innovation. Community. Security.