libdpkg: Add zstd support for .deb archives
commit2c2f7066bd8c3209762762fa6905fa567b08ca5a
authorGuillem Jover <guillem@debian.org>
Mon, 9 Jan 2023 01:32:42 +0000 (9 02:32 +0100)
committerGuillem Jover <guillem@debian.org>
Tue, 10 Jan 2023 12:43:37 +0000 (10 13:43 +0100)
treebc0d4a8ff110db8920cafbd1e4c503639af641c1
parentda2a72dd681092ddc59df5bd98784b7f876c0a3e
libdpkg: Add zstd support for .deb archives

This adds support for .deb ZStandard compression and decompression.
The main reason for this addition is due to Ubuntu having forked the
.deb ecosystem when they added support for this unilaterally, so now
there are many .deb in the wild using this compression format, which
cannot be handled by the upstream dpkg-deb tool.

Although at least now the ZStandard format is widely used on many
projects, has been specified within the IETF as RFC8878, so backwards
compatibility and format stability are no longer a concern, and it has
good trade offs between size and speed.

This has been implemented from scratch, based on the initial prototype
code used during the early request evaluation. Using the new advanced
API, with support for multi-threading, and using an I/O loop resembling
the one used with liblzma, as the plan is to eventually switch all
compressors to use a single I/O loop implementation.

Closes: #892664
15 files changed:
README
configure.ac
debian/control
debian/rules
lib/dpkg/Makefile.am
lib/dpkg/compress.c
lib/dpkg/compress.h
lib/dpkg/libdpkg.pc.in
m4/dpkg-libs.m4
man/deb.pod
man/dpkg-deb.pod
src/Makefile.am
src/at/deb-format.at
src/deb/extract.c
src/deb/main.c