Lossless Data Compression: Huffman Encoding/Decoding using C Language

0 25

Example:

Sample Data: ABRACADABRA

Character Frequency Count: A -> 5, B -> 2, C -> 1, D -> 1, R -> 2

Huffman Tree:

Huffman Table:

A -> 0

B -> 100

C -> 1010

D -> 1011

R -> 11

Substitute:

ABRACADABRA = 0 100 11 0 1010 0 1011 0 100 11 0 (only 3 bytes)

(you need the table to decode... don't lose it!)

Source Code: https://github.com/rald/hufdos

1
$ 0.05
$ 0.05 from @Ceddy-lim

Comments