Skip to content

ReturnKartikey/SecureCompressionTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Secure Compression Tool v1.0

A C++ CLI-based compression tool with built-in encryption, metadata handling, and support for binary files.

πŸ“¦ Requirements

  • βœ… C++17 compiler (e.g., g++ or clang++)
  • βœ… nlohmann files
    • πŸ‘‰ Place the file in the same directory as this tool (\nlohmann)

Optional (for large files):

  • βœ… 16GB+ RAM recommended
  • βœ… 64-bit OS

πŸ”§ Compilation Instructions

Compile using g++:

g++ main.cpp -std=c++17 -o main

πŸš€ Usage Instructions

Step 1️⃣ - Run the program:

./main

Step 2️⃣ - Authenticate

  • πŸ” Username: admin
  • πŸ” Password: admin123

Step 3️⃣ - Choose Operation

  • [1] Compress
  • [2] Decompress

Step 4️⃣ - Enter XOR Key (e.g. "123x456x")

  • πŸ’‘ This is used for encryption and decryption. Use the same key to decompress later.

πŸ“ Compression Flow

  • πŸ‘‰ Input: any file (TXT, CSV, JSON, BIN, PDF, etc.)
  • πŸ‘‰ You'll be asked:
    • File path
    • Compression method: "huffman" or "shannon"
  • βœ… Output:
    • Compressed binary: <filename>.bin
    • Metadata: <filename>.meta

πŸ“‚ Decompression Flow

  • πŸ‘‰ Required:
    • Same XOR key used during compression
    • Original file name (e.g., "sample.csv")
  • βœ… Output:
    • Restored file written as original (e.g., "sample.csv")

⚠️ Notes

  • DO NOT delete the .meta file β€” it's required for decompression.
  • The XOR key must be remembered β€” there's no recovery mechanism.
  • Large files (1GB+) may take time depending on system resources.

πŸ› οΈ Support / Troubleshooting

  • Make sure you're using the correct XOR key.
  • Ensure the JSON metadata and binary file are not corrupted or renamed.
  • Run in a terminal/console that supports UTF-8 characters.

About

πŸ” A secure CLI data compression tool in C++ with Huffman/Shannon-Fano encoding and XOR encryption.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages