bobvanderlinden / sharpfilesystem

A virtual file system for .NET written in C#
MIT License
282 stars 69 forks source link

Question: does SharpZipLibFileSystem support creating huge files? #9

Closed vector-man closed 8 years ago

vector-man commented 8 years ago

I looked over the source code and it appears that SharpZipLibFileSystem stores files in memory when they are created (I'm not positive about that, because I didn't examine everything). Will this prevent files larger than RAM from being created?

bobvanderlinden commented 8 years ago

No, it does not. Zip files aren't the greatest for adding/removing files once the zip is already created. It is mostly useful as an readonly filesystem, but it can be used as a writable one in-memory. It would be hard to get writable working correctly, as SharpZipLib will start writing the zip file itself once CommitUpdate and Close is called. At the moment SharpZipLibFileSystem will call these upon disposal.

If you want to create large zip files, I'd suggest using ZipOutputStream from SharpZipLib itself.

vector-man commented 8 years ago

Thanks!