mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #354] [MERGED] Support Deflate64 decompression #983
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/adamhathcock/sharpcompress/pull/354
Author: @frabar666
Created: 2/28/2018
Status: ✅ Merged
Merged: 3/1/2018
Merged by: @adamhathcock
Base:
master← Head:deflate64-decompress📝 Commits (1)
6e2c7d2support Deflate64 decompression📊 Changes
19 files changed (+2062 additions, -3 deletions)
View changed files
📝
FORMATS.md(+3 -2)📝
src/SharpCompress/Common/CompressionType.cs(+2 -1)📝
src/SharpCompress/Common/Zip/ZipEntry.cs(+4 -0)📝
src/SharpCompress/Common/Zip/ZipFilePart.cs(+5 -0)➕
src/SharpCompress/Compressors/Deflate64/BlockType.cs(+13 -0)➕
src/SharpCompress/Compressors/Deflate64/Deflate64Stream.cs(+257 -0)➕
src/SharpCompress/Compressors/Deflate64/DeflateInput.cs(+43 -0)➕
src/SharpCompress/Compressors/Deflate64/FastEncoderStatus.cs(+245 -0)➕
src/SharpCompress/Compressors/Deflate64/HuffmanTree.cs(+311 -0)➕
src/SharpCompress/Compressors/Deflate64/InflaterManaged.cs(+738 -0)➕
src/SharpCompress/Compressors/Deflate64/InflaterState.cs(+42 -0)➕
src/SharpCompress/Compressors/Deflate64/InputBuffer.cs(+202 -0)➕
src/SharpCompress/Compressors/Deflate64/Match.cs(+17 -0)➕
src/SharpCompress/Compressors/Deflate64/MatchState.cs(+13 -0)➕
src/SharpCompress/Compressors/Deflate64/OutputWindow.cs(+151 -0)📝
tests/SharpCompress.Test/TestBase.cs(+1 -0)📝
tests/SharpCompress.Test/Zip/ZipArchiveTests.cs(+10 -0)📝
tests/SharpCompress.Test/Zip/ZipReaderTests.cs(+5 -0)➕
tests/TestArchives/Archives/Zip.deflate64.zip(+0 -0)📄 Description
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 existingDeflateStream(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 issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.