Skip to content

Wanda550/cpp-file-compressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ File Compressor

A file compressor written in C++.

This application provides lossless compression and decompression for arbitrary binary files through the command-line interface.

Features

  • Lossless compression
  • Binary-safe processing
  • Custom .rle file format
  • Command-line interface
  • Cross-platform (Linux, macOS, Windows with MinGW)
  • Modular design for future algorithm expansion
  • File format validation
  • Future format versioning
  • Corruption detection

Supported File Types ( for now )

The compressor operates on raw byte streams and can process:

  • .txt
  • .bmp
  • .raw
  • .bin
  • .csv
  • .log
  • Any arbitrary binary file

Compression Technique

1. Run-Length Encoding (RLE)

The implementation uses byte-level RLE encoding.

Repeated byte sequences are stored in the format:

[count][byte]

Usage

Compress

cpp-compress -c input_file output_file.rle

Decompress

cpp-compress -d input_file.rle output_file

Project Structure

cpp-file-compressor/
│
├── src/
│   ├──compressor/
│       ├──rle-compression/
│           ├── rle.cpp
│           └── rle.h
│       ├──huffman-compression/
│           ├── huffman-encoding.cpp
│           └── huffman-encoding.h
│   ├──file/
│       ├── file_reader.cpp
│       └── file_reader.h
│   ├── main.cpp
│
├── build/
├── README.md
└── LICENSE

Future Extensions

Future additional compression techniques, will be:

  • Huffman Coding
  • LZ77 / LZ78
  • LZW

Releases

No releases published

Packages

 
 
 

Contributors

Languages