On 07/20/2017 09:20 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven <p...@kamp.de> > --- > docs/interop/qcow2.txt | 43 ++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 42 insertions(+), 1 deletion(-) >
> +== Compress format extension == > + > +The compress format extension is an optional header extension. It provides > +the ability to specify the compress algorithm and compress parameters > +that are used for compressed clusters. This new header MUST be present if > +the incompatible-feature bit "compress format bit" is set and MUST be absent > +otherwise. > + > +Note: Ommitting the incompatible "Compress format bit" results in the usage s/Ommitting/Omitting/ > +of zlib compression with default compression level (default before QEMU > 2.10). > +However, this old default has a smaller compression window size which > results in > +lower compression ratio and slightly worse compression speed compared to > +explicity specifying zlib compression with default compression level in the s/explicity/explicitly/ > +compress format extension. If window size affects decompression, then we absolutely must specify what window size is in use, both for the old-style compression (bug that we haven't mentioned window size in the past), and for the new-style. That is, if you have to tell zlib at decompression time what size window was used at compression, then our choices for window size should be mentioned in this spec. Furthermore, if window size matters, it sounds like it should be a zlib-specific tunable. I really would like to be able to document that having the extension header present with parameters XYZ is the same as omitting the extension header (but that is only doable if window size is a tunable parameter). I haven't yet checked your code implementation to see where you are setting window sizes, to know if window size is something that should be a tunable in the file format. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature