Skip to content

ZIP-like file compression using cannonical Huffman and run-length encoding

Notifications You must be signed in to change notification settings

Flourek/Huffman-File-Compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Huffman-File-Compression

Simple program that uses Huffman Coding to compress any type of file. It uses canonical Huffman codes to efficiently reconstruct the tree.

Screenshot

Usage

Simply drag any file over the executable to compress it or launch it from the terminal providing the path of the file as an argument. It works the exact same way for decompressing files.

EPI File specification

    char extension[8];       // the first 8 bytes store the extension of the original file 
    int codes_map_len;       // stores how many "CodeBlocks" to read   
    CodeBlock *codes_map;    // stores the huffman codes as SYMBOL | CODE LENGTH to reconstruct the tree
    int last_block_offset;   // the last "DataBlock" has a surplus of bits that aren't codes
    DataBlock *data_blocks;  // packs the otherwise string of binary codes into a 32 bit integer  

Requirements

  • Windows Only
  • C99

Compilation

  • CMAKE 3.16.3

About

ZIP-like file compression using cannonical Huffman and run-length encoding

Topics

Resources

Stars

Watchers

Forks