You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ZipOuputStream does not support writing custom entries #682
Create ZipEntry and set Crc, CompressedSize, Size and CompressionMethod(Deflate).
Try to write deflated stream to zip.
Expected behavior
Archive is created from compressed data.
Actual behavior
There are plently of checks for crc/size/compressed size and many of them are wrong for such a case, also library tries to compress futher compressed stream.
This is not how ZipOutputStream is designed to work. Do you have a specific use case?
Adding a new state and custom logic for this adds to the complexity and maintenance cost, and would need to be fully covered by tests...
Exactly, i was using my own solution, but found this library with rich functional and figured out that adding this possibility into existing codebase should not be a problem
Activity
Temtaime commentedon Oct 28, 2021
I'll try to propose a PR in days, seems there's not so much to fix
Fix icsharpcode#682
[-]Enable ZipOuputStream to write precompressed files[/-][+]ZipOuputStream does not support writing custom entries[/+]piksel commentedon Nov 2, 2021
This is not how
ZipOutputStreamis designed to work. Do you have a specific use case?Adding a new state and custom logic for this adds to the complexity and maintenance cost, and would need to be fully covered by tests...
Temtaime commentedon Nov 2, 2021
Ok, i'll add some tests.
It can be used to serve files from webserver that are stored already precompressed to avoid CPU resources on compression
piksel commentedon Nov 2, 2021
Okay, so for combining a variable set of files into a single download by creating a ZIP archive on-the-fly?
Temtaime commentedon Nov 2, 2021
Exactly, i was using my own solution, but found this library with rich functional and figured out that adding this possibility into existing codebase should not be a problem