Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

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

Conversation

@elitzamarinova
Copy link

@elitzamarinova elitzamarinova commented Dec 20, 2022

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

@christophwille christophwille Dec 20, 2022

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

@elitzamarinova elitzamarinova Dec 20, 2022

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.

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...

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

Reviewers

@christophwille christophwille christophwille left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /