Flush files to disk to reduce RAM usage

Issue #98 new
anmac1789 created an issue

Hello everyone, when writing files to zip archives using fuse-zip, why does it add memory usage instead of copying each file one by one and then freeing up memory for the next write operation ?

Comments (3)

  1. Alexander Galanin repo owner

    Hi!
    Yes, fuse-zip stores new/modified files in RAM until unmount. This is how it’s implemented for now.
    The main reason is ZIP file format: unlike traditional file systems it’s sequential so changing one file in the middle of the archive requires to re-write all data till the end. That’s why libzip doesn’t support “sync” operation that flushes the archive to disk and updates all the indices inside struct zip object.
    Implementing this on application level will require to close/reopen zipfile and re-read all file metainformation. It’s a big feature and I have no free time time do it right now.

    See also feature #62.

  2. Log in to comment