mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
[PR #573] [MERGED] Add read-only support for Dmg archives #1111
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/573
Author: @Artentus
Created: 2/17/2021
Status: ✅ Merged
Merged: 6/4/2021
Merged by: @adamhathcock
Base:
master← Head:master📝 Commits (6)
5faa603Merge pull request #1 from adamhathcock/masterd5e6c31Merge pull request #2 from adamhathcock/master9600709Add read-only support for DMG archives014ecd4Merge pull request #3 from adamhathcock/masterd5cbe71Revert global.json5acc195Merge branch 'master' into master📊 Changes
39 files changed (+3606 additions, -4 deletions)
View changed files
📝
src/SharpCompress/Archives/ArchiveFactory.cs(+15 -2)➕
src/SharpCompress/Archives/Dmg/DmgArchive.cs(+117 -0)➕
src/SharpCompress/Archives/Dmg/DmgArchiveEntry.cs(+32 -0)📝
src/SharpCompress/Common/ArchiveException.cs(+5 -0)📝
src/SharpCompress/Common/ArchiveType.cs(+2 -1)➕
src/SharpCompress/Common/Dmg/DmgBlockDataStream.cs(+323 -0)➕
src/SharpCompress/Common/Dmg/DmgEntry.cs(+52 -0)➕
src/SharpCompress/Common/Dmg/DmgFilePart.cs(+21 -0)➕
src/SharpCompress/Common/Dmg/DmgUtil.cs(+183 -0)➕
src/SharpCompress/Common/Dmg/DmgVolume.cs(+38 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSCatalogRecord.cs(+336 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSExtentDescriptor.cs(+31 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSExtentRecord.cs(+115 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSFinderInfo.cs(+145 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSForkData.cs(+50 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSForkStream.cs(+196 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSKeyedRecord.cs(+91 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSPermissions.cs(+35 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSStructBase.cs(+187 -0)➕
src/SharpCompress/Common/Dmg/HFS/HFSTreeHeaderRecord.cs(+108 -0)...and 19 more files
📄 Description
As the title suggests, this adds support for reading and extracting Dmg archives.
Only Dmg archives that use the GPT partitioning scheme with a HFS+ or HFSX data partition are supported, but that should cover the large majority of Dmgs out there (any DMGs created on MacOS 8.1 and newer will have this format).
I didn't see any way of implementing this as read-through so only the archive API is available.
Unfortunately I'm not able to provide test data as I don't have access to a Mac to create Dmgs. I have tested extensively using my own data but I cannot share that data publicly. Hopefully someone else will be kind enough to provide those.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.