Currently my program creates a very large and complex directory layout for multiple different files also created by my program. It takes a long time to do so, especially if the files being written are big.

Would it be possible instead of writing necessary data to files in the proper directory to actually write the data to an uncompressed zip file using the same directory layout as in the filesystem with the same names for directories and files but not actually creating those files ever in the filesystem?

Thanks

2 Answers

You can use a library such as libzip to create and access zip files from a C program.

However, it is unlikely to be much faster, unless your disks are very slow and your CPU is very fast. Random access to the file contents will be quite a bit harder and slower, too, if you need anything else than sequential reading of files from beginning to end.

1

You can use the LZO it's a real-time data compression library.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy