numeric values for --compress-algo
in addition to the documented named compression algorithms, gpg appears to accept numerical compression algorithms as arguments for --compress-algo. gpg-sq only accepts names:
0 dkg@bob:~$ rm -rf tmp/zzz && mkdir -m 0700 tmp/zzz
0 dkg@bob:~$ gpg-g10code --batch --no-tty --homedir $(pwd)/tmp/zzz --passphrase '' --quick-gen-key foo
gpg: keybox '/home/dkg/tmp/zzz/pubring.kbx' created
gpg: /home/dkg/tmp/zzz/trustdb.gpg: trustdb created
gpg: directory '/home/dkg/tmp/zzz/openpgp-revocs.d' created
gpg: revocation certificate stored as '/home/dkg/tmp/zzz/openpgp-revocs.d/26BCCCF7DB7C412BB612AF4578977C81ADC9E329.rev'
0 dkg@bob:~$ echo test | gpg-g10code --batch --no-tty --homedir $(pwd)/tmp/zzz --armor -r foo --compress-algo 1 --encrypt
gpg: checking the trustdb
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: next trustdb check due at 2028-10-12
-----BEGIN PGP MESSAGE-----
hF4Dgccd5uUHddQSAQdAN20VDNQD7mH/gjEsd8vaX290AdsOYNJy+SpyJ1Aj+Gkw
E6mVVJbYYQl3BleFv4xfFRKqRGIMpqwQvDQnkTufDOx0pkaC2Pzm9K1d+0NFJDhv
0joBRQl8ZmRMWpQCZYo9leiVQwvkQhVQ3tbyPQPZxqfEuozci8fuXJSc2SyX5Z3E
EE64oN4aLY95wpAH
=/yoA
-----END PGP MESSAGE-----
0 dkg@bob:~$ echo test | gpg-sq --batch --no-tty --homedir $(pwd)/tmp/zzz --armor -r foo --compress-algo 1 --encrypt
gpg: error: Error parsing --compress-algo
gpg: because: Unknown compression algorithm "1"
1 dkg@bob:~$ gpg-sq --version
gpg (GnuPG-compatible Sequoia Chameleon) 2.2.40
Sequoia gpg Chameleon 0.13.1
sequoia-openpgp 2.0.0
Copyright (C) 2024 Sequoia PGP
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /home/dkg/.gnupg
Supported algorithms:
Pubkey: RSA, DSA, ECDH, ECDSA, EDDSA, X25519, X448, Ed25519,
Ed448
Cipher: BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224, SHA3-256,
SHA3-512
Compression: Uncompressed, ZIP, ZLIB, BZIP2
0 dkg@bob:~$
Edited by Daniel Kahn Gillmor