Skip to content

A C language implementation of a Canonical Huffman Encoder and Decoder pair

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

gdavidbutler/canonicalHuffman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

canonicalHuffman

A C language implementation of a Canonical Huffman Encoder and Decoder pair

No dependencies. No dynamic memory allocation. No recursion. Small and Fast.

There are two (handled) exceptions to huffman encoding:

  • If the input is already "dense", the ouput is flagged as such (and is larger as a result).
  • If the input contains a single value, the encoding is, effectively, run-length encoded.

Otherwise, huffman encoding should be smaller than the input.

Some examples of using this:

  • test/encode.c - encodes file on command line to stdout
  • test/decode.c - decodes file on command line to stdout

About

A C language implementation of a Canonical Huffman Encoder and Decoder pair

Topics

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published