-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NotSupportedException for 7zip Archive using Ultra Compression #526
Comments
It's likely hitting the default case in the below switch statement that means it's an implemented method of compression
|
Is there something wrong with my archive that it's not triggering the Is there a work-around or some other steps I can take to get this working? Do you want me to attach the archive so you can debug it further? |
I can tell you I'm not going to get any time to debug this. You can debug it yourself and see what the ID is. Like I said, I'm guessing it's something newish that isn't implemented. Might be LZMA with different settings but no idea. |
Ok, no worries. I got this working with a different NuGet package. |
If you've found a solution that doesn't use the native library, let me know. I'll leave this issue open as a reminder there's a new compression method in 7Zip |
I switched to SevenZipExtractor, which describes itself as "C# wrapper for 7z.dll (x86 and x64 included)." I don't think it's a new compression method, but I didn't go beyond the 7-zip GUI, which suggested that I'm using "LZMA" or "LZMA2" - both of which throw the same exception. |
Tried to recreate this but failed, 7zip file worked in my case, any hints on how to trigger or if you have a test file somewhere @nightblade9 ? |
As I mentioned, I switched to SevenZipExtractor. The repro case for the zip file wasn't anything special, just a regular MP3 file. My initial comment in this issue mentions this, you can try that:
This is referring to the 7-zip GUI file manager ( |
Ah, music files, that would probably then be the Delta filter
https://www.reddit.com/r/touhou/comments/44thjk/use_7zips_delta_filter_to_decrease_the_size_of/
as in "const UInt32 k_Delta = 3;"
…On Tue, Feb 14, 2023 at 11:52 PM TraceEntertains ***@***.***> wrote:
Something I find very odd is that I had practically the same exception,
specifically the part that all of the files up to a WAV file extracted
fine, which I find odd because you mentioned that you got stuck on an MP3
file. Maybe there is something making it to where audio files can't be
extracted?
—
Reply to this email directly, view it on GitHub
<#526 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOI7CLCOLREJGUDZWSZCGXDWXQED3ANCNFSM4O3M6ZAQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
There is nothing that cannot be solved through sufficient application of
brute force and ignorance.
|
I managed to make sufficient progress on implementing the delta filter after many times asking in the C# discord server, using ChatGPT, et cetera. I am currently stuck, as the buffer size passed to it when it gets read is 128kb, but the output size is less than that, and it seems to be causing problems (garbage data, preventing extraction of further files, etc). |
Currently my error is that after one file gets finished, a 0-byte decompress (happens a lot with delta decoding, atleast with my code), actually has a size of "count (of the file before the 0-byte) - 131072" (that file usually having around 80-90k bytes, so not 128kb, and ending up underflowing when trying to initialize a negative sized array) If you want to help, please reach out to me on discord: TraceEntertains#5092 I really want to see Delta decompression on this get added, as it is one of the final roadblocks (that I can tell) before the vast majority of 7z files can be decompressed successfully. |
@adamhathcock , Should we move the K_xxx defines into CMethodId.cs instead of Registry.cs ? |
@TraceEntertains , I would like to know if you have a test file that fails with the pull request I created. the current test contains the general setup of files used in the test suite and that passed. |
Both my delta test file and the original archive it was based on extracted seemingly perfectly, and the music files were the quickest to extract out of almost all other files that I could tell. |
Thanks Erior. I've been away for personal reasons. |
I zipped up a file using 7zip (file manager / GUI). I tried with both LZMA and LZMA2, using ultra compression. I can't seem to figure out how to extract it; I always get a
NotSupportedException
.Here are the two snippets I tried with the archiving API, which supposedly works?
I think they fail with the same exception. Here's the stack trace for the second one:
I'm sure it must be something I'm doing wrong (perhaps in my 7zip archive creation?) but I can't figure out what or how to make this work.
The text was updated successfully, but these errors were encountered: