xopen does not support .zst file compressed with Zstandard long memory mode
When compressing a file with long memory mode
`zstd -T4 -9 --force --rm --exclude-compressed --no-progress --long=31 file.txt`
Xopen cannot decode it
```
python3 -c 'import xopen; f = xopen.xopen("file.txt.zst"); f.readline()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
zstd.ZstdError: zstd decompress error: Frame requires too much memory for decoding
```
```
zstd -vl file.txt.zst
*** Zstandard CLI (64-bit) v1.5.5, by Yann Collet ***
tmpz/ip2ip_final.rpt.zst
# Zstandard Frames: 1
DictID: 0
Window Size: 1.18 GiB (1264573175 B)
Compressed Size: 27.6 MiB (28914291 B)
Decompressed Size: 1.18 GiB (1264573175 B)
Ratio: 43.7352
Check: XXH64 d5d984dc
```
It seems the way to address this is [here in the lower level zstandard library](https://stackoverflow.com/questions/69270987/how-to-resolve-the-error-related-to-frame-used-in-zstandard-which-requires-too-m).
关闭于 2024-03-27 10 条评论