Dpkg7Zip
Launchpad Entry: https://launchpad.net/distros/ubuntu/+spec/dpkg-7zip
Created: Date(2005-11-05T18:28:56Z) by ScottJamesRemnant
Contributors: ScottJamesRemnant
Packages affected: dpkg
Summary
Evaluate 7zip compression for use in debs, as an alternative to gzip or bzip2.
Rationale
7zip is a new compression algorithm that boasts reduced file size over the existing gzip and bzip2 schemes. If this can be used to reduce the size of packages, it frees up space on the CD for more packages.
Use cases
- Colin is an Ubuntu Developer who constructs the CD images, he notices that the amd64 CD is too large; instead of removing another language pack, he'd like to increase the compression of existing packages to fit them.
Scope
Design
Implementation
Code
The inclusion of bzip2 support into dpkg introduced a generic compression layer, in lib/compression.c. 7zip support can be added in a similar way:
Add the location of the 7zip support as a ZIP7 macros in lib/dpkg.h.
Add ZIP7 to the compression_type enum in lib/dpkg.h
Define data member name macros in dpkg-deb/dpkg-deb.h.
Handle the new data member in dpkg-deb/build.c and dpkg-deb/extract.c.
Add both "by exec" and "by library" support to lib/compression.c
Add format selection options in dpkg-deb/main.c
Data preservation and migration
Packages that would benefit from the conversion would select it when building in their debian/rules as we did for the bzip2 change; they would also Pre-Depend on the appropriate version of dpkg.
Outstanding issues
Is there actually any benefit to this? Testing needs to be done to find out whether it's worthwhile.