Bug 502331

Summary: Ark cannot load Zstandard (zstd) archives compressed with --long=28 or higher
Product: [Applications] ark Reporter: tux <tux>
Component: generalAssignee: Elvis Angelaccio <elvis.angelaccio>
Status: CONFIRMED ---    
Severity: normal CC: rthomsen6, ttv200
Priority: NOR    
Version First Reported In: 25.08.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description tux 2025-04-02 19:09:59 UTC
SUMMARY
Ark cannot load Zstandard (zstd) archives that are compressed with `--long=28` (or higher).
The command line tool `zstd` also throws an error that "Frame requires too much memory for decoding" when just doing `zstd -d file.tar.zst`, but passing `--long=...` to the decompression command works fine (e.g. `zstd --long=28 -d file.tar.zst`).

The `--long=28` (or higher) option is useful for most desktop/laptop users, because it can significantly enhance compression on folders/file whose size is over 100 MB at the cost of some (trivial amount of) memory and a very small increase in compression time.

I also think that `--long` should be enabled by default in Ark when compressing to zstd, because it can significantly enhance compression at almost no speed cost.

For example, compressing the 1326 MiB GE-Proton9-27 folder at level 15 yields an archive of 385 MiB in 14 seconds, but just 283 MiB in 15 seconds when `--long=29` is used. That's 102 MiB less for just one extra second. To achieve a similar compression without using `--long`, the compression level needs to be increased to level 21 which takes 84 seconds (and even then the archive is still larger at 288 MiB).

As `--long` is the same as `--long=27` and corresponds to 128M of memory it would be the safest default, but `--long=28` at 256M or `--long=29` at 512M are good defaults too, considering that most desktop/laptop users have at least 8 GB of system memory.

STEPS TO REPRODUCE
1. Create zstd archive with `--long=28` (or higher, up to 31).
2. Try to open archive with Ark.

OBSERVED RESULT
The following error is shown: `Loading the archive ‘file.tar.zst’ failed with the following error: Archive corrupted or insufficient permissions.`

EXPECTED RESULT
The archive gets loaded and can be used/extracted.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.9.0
Comment 1 ttv200 2025-09-07 19:55:43 UTC
I found this too. version  25.08.0