On Mon 20 May 2019 08:20:23 AM CEST, Denis Plotnikov wrote:
> + /* Compression type extension */
> + if (s->compression_type != 0) {
> + Qcow2CompressionTypeExt comp_header = {
> + .compression_type = cpu_to_be32(s->compression_type),
> + };
Shouldn't we have an enum to define the available compression types
instead of using numeric constants in the code?
> +== Compression type extension ==
> +
> +The compression type extension is an optional header extension. It stores the
> +ID of the compressor which has to be used to compress/decompress disk
> clusters.
> +A single compression type is applied to all compressed disk clusters,
s/the ID of the compressor/the ID of the compression algorithm/
> +Available compression types:
> + ID 0: Invalid value
> + 1: ZSTD
Why is 0 invalid ?
Also: do we need a way to define the compression level?
Berto