You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
.bin file
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)