Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wciesialka/huffmancodegenerator
Generate Huffman Codes.
https://github.com/wciesialka/huffmancodegenerator
algorithms
Last synced: about 9 hours ago
JSON representation
Generate Huffman Codes.
- Host: GitHub
- URL: https://github.com/wciesialka/huffmancodegenerator
- Owner: wciesialka
- Created: 2023-12-05T21:20:23.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-12-21T19:16:20.000Z (11 months ago)
- Last Synced: 2024-01-30T13:04:29.203Z (10 months ago)
- Topics: algorithms
- Language: C++
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# huffmancodegenerator
Generate Huffman Codes, encode data, and decode data.## Setup
### Prerequisites
- C++11
- GNU Make[^1][^1]: Build requirement only.
### Building
Run `make` or `make all`.
## Running
After building, you may run the program from the command line. Run `huffman --mode encode` to encode, or `huffman --mode decode` to decode.
Usage:
```
usage: huffman [options]
options:
-m, --mode {encode|decode} Run program in either encode or decode mode.
-h, --help Display this message and quit.
```### Encoding
Encoding expects the following input in the same directory as being run:
- `input.txt`, containing the input data to be encoded.It will generate three output files:
- `freq.txt` contains frequencies of characters.
- `codetable.txt` contains the code table.
- `encoded.bin` contains the encoded data.### Decoding
Encoding expects the following input in the same directory as being run:
- `encoded.bin`, containing the encoded data.
- `codetable.txt`, containing the code table for the Huffman tree.It will produce one output file:
- `decoded.txt`, containing the decoded data.## Author
- Willow Ciesialka