Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

huffman_archiver

Simple file archiver using Huffman encoding.

Build archiver

$ mkdir build && cd build
$ cmake ..
$ cmake --build .

Tests

Doctest used for testing. To run tests:

$ ./huffman_test 

Usage:

There are several flags:

  • -c compress text file
  • -d decompress binary file
  • -f <path>, --file <path> name of input file
  • -o <path>, --output <path> name of output file

To encode text file

$ ./huffman_archiver -c -f toCompress.txt -o compressed.bin

To decode binary file

$ ./huffman_archiver -d -f compressed.bin -o decompressed.bin

Example:

$ ./huffman_archiver -c -f myfile.txt -o result.bin
15678 
6172
482

15678 - size of input file in bytes, 6172 - size of compressed data without metadata in bytes, 482 - size of metadata in bytes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages