Discussion: As noted in the c++ source file, the lines may start with many leading spaces. To save space in saving the file (to compress the file), the leading spaces of each line in the source file are counted and the count is stored as an integer at the beginning of the line followed by the rest of the characters of the line in the destination file.
Example:
Source file: source.txt
No leading space on line 1
_____Five leading spaces on line 2
______________Fourteen leading spaces on line 3
____Two leading spaces on line 4
0No leading space on line 1
5Five leading spaces on line 2
14Fourteen leading spaces on line 3
2Two leading spaces on line 4
1. Write a C++ program to compress a C++ source file, store the compressed file in source.zpp, and output to the monitor screen the number of space characters eliminated from the original source file.
2. Write a C++ program to uncompress the .zpp file previously compressed and store the uncompressed file in source.rcv.