Skip to content

berracode/compression_tool_in_c

Repository files navigation

Compression tool

This tool written in C is a simple compression tool inspired in https://codingchallenges.fyi/challenges/challenge-huffman/

cli

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
git clone git@github.com:berracode/compression_tool_in_c.git
cd compression_tool_in_c
  1. Compile project using make
make

Usage

Compresion

./cpress compress /path/to/plain.txt  /path/to/compressed.bin

Decompression

./cpress decompress /path/to/compressed.bin  /path/to/plain.text

Valgrind command

valgrind --leak-check=full --track-origins=yes ./cpress compress ./test_files/victor.txt

About

Compression tool written in C using Huffman coding

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published