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 1 commit into from Mar 1, 2018


None yet
2 participants

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.


This comment has been minimized.


adamhathcock commented Mar 1, 2018

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

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment