DField SolutionsMérnöki stúdió · Budapest
Loading · Töltődik
Skip to content
Category: Data compression + information theory

Pithos

The same message, far fewer bits.

What it is

Pithos is a data-compression demo that implements a complete Huffman coding pipeline from scratch: counting symbol frequencies, building the tree, deriving canonical codes, and encoding and decoding. It also computes Shannon entropy, which makes it a hands-on look at the information-theory limits the coder approaches. It is a from-scratch, dependency-light build - 13 tests include the prefix-free property and the average-code-length being within the [H, H+1) Shannon bound - that you can download and run locally.

A complete Huffman pipeline (frequencies → tree → canonical codes → encode/decode) plus Shannon entropy, all pure. 13 tests, including the prefix-free property and the average-code-length ∈ [H, H+1) Shannon bound.

What's inside

The full source, the tests, and CI. Open it, read it, change it. A zero-dependency core, free, in the MIT spirit.

Run it after unzip

pnpm install && pnpm dev