#1145051 zstd: Decompression ignores --format= option

Package:
zstd
Source:
zstd
Description:
fast lossless compression algorithm -- CLI tool
Submitter:
Alper Nebi Yasak
Date:
2026-08-21 19:27:02 UTC
Severity:
normal
#1145051#5
Date:
2026-08-21 19:25:20 UTC
From:
To:
Dear Maintainer,

zstd seems to ignore the --format= option when doing decompression or
testing archives:

  $ head -c32 /dev/zero | gzip -c | zstd -dc --format=xz | xxd
  00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
  00000010: 0000 0000 0000 0000 0000 0000 0000 0000  ................

  $ head -c32 /dev/zero | gzip -c | zstd -tc --format=xz; echo $?
  /*stdin*\           : 32 bytes
  0

Compare to xz which returns an error for a similar case:

  $ head -c32 /dev/zero | xz -c | xz -dc --format=lzma; echo $?
  xz: (stdin): File format not recognized
  1

From the zstd manual page it's clear the option is meant to apply to
decompression as well: