To solve this two-part problem, we will use the same ZipLib library we saw for the solution of the previous problem. The solution to this problem consists of two functions, one that is able to perform the compression to a ZIP archive and one that is able to perform decompression from a ZIP archive.
In order to perform the requested compression, we should do the following:
- If the source path represents a regular file, then add that file to the ZIP archive using ZipFile::AddFile()
- If the source path represents a recursive directory, then:
- Iterate recursively through all the entries in the directory
- If an entry is a directory, then create a directory entry in the ZIP archive with ...