mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
[PR #205] [MERGED] Add zip64 support for ZipArchive extraction #891
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/205
Author: @markryd
Created: 1/24/2017
Status: ✅ Merged
Merged: 1/24/2017
Merged by: @adamhathcock
Base:
master← Head:zip64-extraction📝 Commits (1)
6be6ef0Add zip64 support for ZipArchive extraction📊 Changes
10 files changed (+177 additions, -41 deletions)
View changed files
📝
src/SharpCompress/Common/Zip/Headers/DirectoryEndHeader.cs(+10 -0)➕
src/SharpCompress/Common/Zip/Headers/Zip64DirectoryEndHeader.cs(+54 -0)➕
src/SharpCompress/Common/Zip/Headers/Zip64DirectoryEndLocatorHeader.cs(+30 -0)📝
src/SharpCompress/Common/Zip/Headers/ZipFileEntry.cs(+4 -2)📝
src/SharpCompress/Common/Zip/Headers/ZipHeaderType.cs(+3 -1)📝
src/SharpCompress/Common/Zip/SeekableZipHeaderFactory.cs(+50 -27)📝
src/SharpCompress/Common/Zip/ZipFilePart.cs(+2 -1)📝
src/SharpCompress/Common/Zip/ZipHeaderFactory.cs(+12 -9)📝
test/SharpCompress.Test/Zip/ZipArchiveTests.cs(+12 -1)➕
test/TestArchives/Archives/Zip.zip64.zip(+0 -0)📄 Description
I've taken a first cut at some limited zip64 support. It is extract only and only on the Archive API at this point.
Note: I'm casting 8 byte values to
longinstead of supporting the fullulongas it simplifies the implementation quite a bit. Things likeReader.Seektake alongdirectly, it's easy enough to cover that with multiple reads but I ended up backing away as it made the change much larger for minimal benefit (9 Exabyte archive size limitation instead of 18 etc). Also CLS compliance means we can't exposeulong. More than happy to revisit that if required.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.