metherul / Automaton

The open modpack platform.
Other
59 stars 14 forks source link

Is there a reason to use SevenZipExtractor and not just SevenZipSharp #59

Closed barcharcraz closed 5 years ago

barcharcraz commented 5 years ago

I just ask because it doesn't look like there's a package requirement on SevenZipExtractor, which makes the project fail to build from source.

AustinHaugerud commented 5 years ago

@metherul

Doesn't SharpCompress handle the 7zip format among others? SevenZipSharp seems like it should be obsolete to use at this point.

halgari commented 5 years ago

SevenZipExtractor allows us to use a callback based approach to file extractions. Most libraries that we tried only allowed for full extraction or a slower single file extraction method. Many archive types are SOLID archive which are formatted in a way that skipping to and extracting a single file is very slow. SevenZipExtractor allows us to extract only the files we need without having to read through the entire archive for each file.

In addition I have modified the library in a branch to allow us to extract SOLID archives without having to write to disk at all. We can extract into any .NET stream. I'm fine with using any library that supports the following features:

1) efficient support for SOLID archives 2) allows extraction to memory streams 3) supports all the archive formats 7zip supports (zip, rar, 7z, etc.)

halgari commented 5 years ago

More info: https://en.wikipedia.org/wiki/Solid_compression

halgari commented 5 years ago

The fact that we have two library references is due to us not deleting the older one, all the routines (that I'm aware of) use SevenZipExtractor, the other library isn't needed.

metherul commented 5 years ago

This does come back to the fact that we need to publish our modified SevenZipExtractor to nuget so builds function fine. If that's too far out of the way, I may be able to modify the .gitignore to include the binary.