https://github.com/berracode/compression_tool_in_c
Compression tool written in C using Huffman coding
https://github.com/berracode/compression_tool_in_c
c compression compression-algorithm compression-tool huffman-coding huffman-compression-algorithm
Last synced: 29 days ago
JSON representation
Compression tool written in C using Huffman coding
- Host: GitHub
- URL: https://github.com/berracode/compression_tool_in_c
- Owner: berracode
- Created: 2024-06-10T02:50:30.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-06-10T18:00:13.000Z (11 months ago)
- Last Synced: 2025-02-14T22:24:46.795Z (3 months ago)
- Topics: c, compression, compression-algorithm, compression-tool, huffman-coding, huffman-compression-algorithm
- Language: C
- Homepage:
- Size: 5.55 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Compression tool
This tool written in C is a simple compression tool inspired in https://codingchallenges.fyi/challenges/challenge-huffman/
### Features
- Huffman encode and decode implementation
- Bits manipulation for compact storage
- Handling of UTF-8 characters.### Data Structures
- Binary tree is used to build Huffman tree
- Priority queue is implemented to select nodes with minor frequency.
- Hash table is used to storage and search characters prefix code quickly.### Installation
1. Clone repo
```bash
git clone [email protected]:berracode/compression_tool_in_c.git
cd compression_tool_in_c
```2. Compile project using make
```bash
make
```### Usage
#### Compresion
```bash
./cpress compress /path/to/plain.txt /path/to/compressed.bin
```#### Decompression
```bash
./cpress decompress /path/to/compressed.bin /path/to/plain.text
```## Valgrind command
```sh
valgrind --leak-check=full --track-origins=yes ./cpress compress ./test_files/victor.txt
```