Question: Write a C++ program to a) compress and b) decompress a file containing alphabet characters and symbols (no numbers). If the input file contains BBBBcccc...KKKLL
Write a C++ program to a) compress and b) decompress a file containing alphabet characters and symbols (no numbers). If the input file contains "BBBBcccc...KKKLL" the compressed result will be "4B4c3.3K2L" Additionally, newline characters are read but appear only as a number. For example, if the previous input ended in a newline character (' ') the result would be "4B4c3.3K2L1"
This program must read in characters individually using istream::get() and while loops (basic programming techinques) -- No advanced algorithms or libraries.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
