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

Support Deflate64 decompression #354

Merged
merged 1 commit into from
Mar 1, 2018
Merged

Support Deflate64 decompression #354

merged 1 commit into from
Mar 1, 2018

Conversation

frabar666
Copy link
Contributor

@frabar666 frabar666 commented Feb 28, 2018

This adds support for the Deflate64 decompression algorithm, and its use in ZIP archives. Compression is not implemented.

Deflate64 (method 9 in ZIP archives) is a variation of the standard Deflate algorithm.
In Windows Explorer, compressing >2GB files generates a Deflate64-compressed ZIP file.
7-zip can read and write Deflate64 ZIP files.

Entry point is SharpCompress.Compressors.Deflate64.Deflate64Stream, with the same interface as the existing DeflateStream (except only decompression is supported).

Implementation is copied from CoreFX, which is MIT-licensed too. Unfortunately it has to be copied, because it is 1. internal, and 2. not supported on all targeted platforms.
Differences between Deflate and Deflate64 are minor, so I first tried to add Deflate64 support in the existing DeflateStream... but I failed, hence this distinct implementation.

@adamhathcock
Copy link
Owner

Looks great!

I had thought about using all of the Deflate implementation from .NET Core but yeah it's all internal :(

@adamhathcock adamhathcock merged commit da56bfc into adamhathcock:master Mar 1, 2018
@frabar666 frabar666 deleted the deflate64-decompress branch July 17, 2019 21:57
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.

2 participants