My suggestion is:- Support transparent compression for all image formats
- Support two compression.formats:
- 1. gzip, because it is wide used and very fast with still good compression ratio.
- 2. xz (the official format for LZMA2 on Linux, this means same compression as 7-zip) because it provides very good compression
The containers and compression methods are very well documented, and there is widely used public-domain code available.
Resources:
For gzip:
Description:
RFC1952
Library:
zlib
For xz:
Description:
XZ file format
Library:
LZMA SDK and
XZ Utils
The image would then be stored as e.g. image.iso.gz or image.iso.xz
The same for other image formats.
So you would have to implement this as filter, which processes the file stream and then forwards it to the code handling the different image formats.
If you would create a plugin-api for this, it could be extended by other developers, but I think this two formats should be enough.