mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-04 05:25:00 +00:00
[PR #7] [MERGED] We need support for SFX archives #781
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/7
Author: @KOLANICH
Created: 10/13/2013
Status: ✅ Merged
Merged: 10/19/2013
Merged by: @adamhathcock
Base:
master← Head:master📝 Commits (1)
13ef1c3added test for SFX 7z archive (and partly implemented the feature, but we still have problems)📊 Changes
7 files changed (+73 additions, -26 deletions)
View changed files
📝
SharpCompress.Test/SevenZip/SevenZipArchiveTests.cs(+11 -0)📝
SharpCompress.Test/TestBase.cs(+25 -7)📝
SharpCompress/Archive/ArchiveFactory.cs(+5 -3)📝
SharpCompress/Archive/SevenZip/SevenZipArchive.cs(+22 -8)📝
SharpCompress/AssemblyInfo.cs(+2 -2)📝
SharpCompress/Common/SevenZip/ArchiveReader.cs(+8 -6)➕
TestArchives/Archives/7Zip.LZMA2.sfx.exe(+0 -0)📄 Description
Hello. I need to extract SFX with it. I have made a test for it and tried to implement it.
I have added a search for a signature (naive, but maybe it will be better to implement some better algorithm) and then i had problems.
The first one is that there is some difference between SFX and not-sfx archive which cause headers and hashsumm corruption.
The second one is that the architecture of this library is a bit strange, so it will be good to change it.
For example we can use Builder pattern : divide the process into generic stages such as finding a signature and recognizing the type using it is the one stage, reading header is another, ... etc.
Because EVERY type of archive can be made sfx or embedded into JPEG.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.