I wanted to add an new task action function to the FPE that will take any new files added to a watch folder and append them to a specified ZIP archive (if the ZIP archive does not exist then it will be created). For this purpose two new classes CZIP and CZIPIO where written and added to the Antikythera classes. The first contains the high level logic to create an archive and add/extract files to/from an archive; the latter contains the low level record file I/O for reading and writing from archives and is the base class of CZIP ( though it may be used standalone to access archives.
Searching the web provided several useful sites that outlined the ZIP file format but the most detailed description was from Appnotes at the PKWARE web site. Version 2.0 was chosen as the baseline for the format with extensions to support > 4 GB files added with ZIP64 support. Files are stored within the archive in two formats
- store – exact copy of the file
- deflate – compressed format implemented using the ZLIB library.
Note: ZLIB is also used to calculate a files 32 CRC checksum.
In the future support may be added for the removal of files but at present it is not needed. The production of theses classes and the modification of the FPE to use them has taken most of my development time up throughout March and I hope to move onto something different in April.