- Download all the files in the same folder.
- Overwrite the input.txt file with the data you wish to compress
- You can change the compression type as per your choice: Open the compression.cpp file, and change the value of "const int tree", 2 for Binary, 4 for Quadnary, 8 for Octanary, 16 for Hexanary...
- Run the following commands:
- g++ -o compression compression.cpp
- compression input.txt
- g++ -o decompression decompression.cpp
- decompression input-reyaan_compressed_it.bin
- 3txt (3 is the size of the type, and txt is the type of file)
- a0011NULL (a is character, 0011 is variable length code, NULL is to know that one character has ended)
- b0101NULL
- c0011NULL
- NULL (NULL if appears twice, we know the codes are ended)
- padding (Padding)
- NULL (Null to know Padding is over)
- 000000000 11111111 00000000 11111111 (The data)