https://github.com/drichardson/huffman
huffman encoder/decoder
https://github.com/drichardson/huffman
compression educational encoder huffman huffman-coding
Last synced: 2 months ago
JSON representation
huffman encoder/decoder
- Host: GitHub
- URL: https://github.com/drichardson/huffman
- Owner: drichardson
- License: unlicense
- Created: 2013-06-21T04:40:00.000Z (almost 12 years ago)
- Default Branch: main
- Last Pushed: 2021-04-25T02:07:11.000Z (about 4 years ago)
- Last Synced: 2025-03-24T10:21:20.211Z (3 months ago)
- Topics: compression, educational, encoder, huffman, huffman-coding
- Language: C
- Homepage:
- Size: 80.1 KB
- Stars: 110
- Watchers: 11
- Forks: 39
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# huffman
[](https://github.com/drichardson/huffman/actions/workflows/build.yml)
A huffman coding library and command line interface to the library. The encoder is a 2 pass encoder. The first pass generates a huffman tree and the second pass encodes the data. The decoder is one pass and uses a huffman code table at the beginning of the compressed file to decode the data.
libhuffman has functions for encoding and decoding both files and memory.
## Makefile Build
To build:
make
To run unit tests:
make check
To run unit tests under valgrind:
make valgrind_check
## CMake Build
To build:
mkdir build
cd build
cmake ..
cmake --build .To run all tests:
ctest
To run unit tests:
ctest -R ^check$
To run unit tests under valgrind:
ctest -R ^valgrind_check$