Skip to content
EzzElDin Salah — home
Work
Backend

Huffman File Compressor

Huffman-coded file compressor reaching roughly 40% reduction on text, with a C/C++ core, multi-threaded I/O, and a C# WinForms front end over it.

  • Algorithms
  • C/C++
  • C#
  • Concurrency
  • WinForms

Systems implemented

  • Huffman coding end to end — frequency analysis, prefix-free code tree construction, and bit-level packing — reaching roughly 40% reduction on text. The interesting constraint is that the decoder has to rebuild the same tree from the encoded stream, so the format must carry enough information to reconstruct itself.
  • Multi-threaded file I/O, so reading and writing overlap instead of serialising. On a large file the work is I/O-bound, which is exactly where parallelism pays and where the coordination problems are worth getting right.
  • A native core with a managed front end. The compressor is written in C/C++; the desktop interface is a separate C# WinForms application on top of it. That split is the part worth pointing at — the two sides have different memory models and different failure behaviour, so the boundary between them has to be designed rather than assumed, and progress has to cross it without blocking the UI thread.
  • Real-time progress reporting, which forced the compression loop to be structured so it can say where it is mid-run.
huffman-file-compressorUpdated 2026-07-26