Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for DEFLATE64 algorithm when extracting from zip archive #818

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elitzamarinova
Copy link

Add support for DEFLATE64 algorithm when extracting from zip archive:

The content of the new classes is borrowed from DEFLATE64 support implementation for DotNetZip which on its part contains modified code from the .NET Core Libraries (CoreFX and System.IO.Compression/DeflateManaged) where deflate64 decompression is implemented.

Other changes are implemented in order to support forward-only stream.

{
int oldSize = rawData.Length;
byte[] resized = rawData;
Array.Resize(ref resized, bufferSize);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are aware that is a costly copy operation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am. But in this particular case I don't think that it is significant.

@piksel
Copy link
Member

piksel commented Dec 23, 2022

This currently fails 4 tests, and I am not too eager in taking in a whole new Deflate implementation (1800 LoC 😓).

I did some PoC testing in c9589cf to see if it could be implemented by allowing the window and max distance to be customized in the existing Deflater.
It still needs more testing and a Inflator support, but it looks promising...

@elitzamarinova
Copy link
Author

Yes, looks promising.
I took a look today at the failings in the tests, seems like the ZipEntry in the ZipInputStream got null somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants