-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Currently when a ZipArchive is created and an entry is added with the CompressionLevel set to "no-compression" the file inside the archive is still wrapped in a deflate stream. The deflate stream correctly does not to compress the file.
However, zip does natively support uncompressed files. The compression method "stored" is made for this.
To create OpenDocument format files (ods, odt etc.) it is required to store the mimetype file without wrapping it in any compression stream. They do this, so that the mimetype can always found at a specific offset.
This change should also be a tiny performance and archive size improvement.
I have attached a diff of the changes necessary to implement this. I've run the tests, however I've not yet been able to build corefx in a way that I can use with my app to validate the patch is working.
diff.zip
If this is something you think is possible to merge, I can spend more time on this to create a proper PR.