Write two classes to handle reading and writing of TAR files. The classes should mimic ifstream/ofstream facilities in C++. I/O should use zlib, but should also handle non-compressed files. Minimum required member functions are open(), close(), write(), eof(). These functions should operate on the .tar/.[login to view URL] file alone. Provide additional member functions to handle TAR functionality - for example, adding a file to the archive or extracting a file from the archive. Reading from the archive (extracting from the tarball) - we expect to get a pointer and length (or a std::string) containing the entire contents of an archived file. Writing to the archive (adding to the tarball) - we expect to pass a pointer and length (or a std::string) for an entire file to be added. Buyer is available to answer any questions. Estimated completion time: 8 man hours
## Deliverables
Full source code with comments, notes, documentation, etc. Provide an example main() which demonstrates complete functionality of the class. Provide a Makefile compatible with GNU and/or BSD make. Buyer will have exclusive rights to the completed code.
## Platform
Must compile clean with g++ 3.4.x. Target platforms are FreeBSD-6.x and Linux 2.6 kernels.