On 04/12/2013 01:55 PM, Benoît Canet wrote:
> Le Friday 12 Apr 2013 à 19:37:48 (+0200), Stefan Hajnoczi a écrit :
>> Image file compression works at cluster granularity.  It is not possible
>> to compress less than a cluster of data at a time.

Shouldn't it be possible to treat a file that is not rounded to a
cluster boundary as though the rest of the final cluster is all NUL
bytes, and compress that?  As long as you know the original size, this
operation is reversible, instead of having to error out just because the
original wasn't a complete multiple.

>> I considered automatically adjusting the output file size but think it's
>> better to be explicit.  This avoids confusion when users notice that
>> image file size changed after conversion.

I agree that changing the final image size on a round trip through
compression is not appropriate, but does that mean we have to reject the
file completely if it wasn't sized to a multiple to begin with?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to