Archiver
Task
Develop a compression program that converts an input text file into a compressed output file of the smallest possible size. Additionally, create a decompression program that can accurately restore the original file from the compressed version (50 points).
Create a compression program that processes all text files in the current directory with names matching the "*.txt" pattern, combining them into a single compressed output file of the smallest possible size. Also, develop a decompression program that can restore all the original text files from this compressed file (30 points).
Since compressed files can sometimes become corrupted, enhance the decompression program with features that notify the user if any corruption is detected in the compressed file (20 points).
Input text files may include uppercase and lowercase Ukrainian, Russian, and Latin letters, numbers, periods, commas, semicolons, colons, question marks, exclamation marks, dashes, double quotes, parentheses, spaces, carriage return symbols (decimal code - 10), and line feed symbols (code 13). Each file concludes with an end-of-file symbol (code 26). Line lengths do not exceed 255 characters. Use the encoding for Ukrainian letters as specified by the provided driver.
Ensure that the compressed file concludes with an end-of-file symbol; this symbol should not appear elsewhere in the compressed file.
The programs should prompt the user for the necessary names of the text and compressed files through a dialog interface.
Compiled programs must process each set of test texts within 5 minutes, while interpreted programs should complete the task within 10 minutes.
The source text file names for the programs should be ARC.* and UNARC.*