read.cash Log in
@Fria edited more from that month

Lossless Data Compression: Huffman Encoding/Decoding using C Language

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

No comments yet

Log in to join in Reading is open to everyone. Replying needs an account.