mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Add two reusable helpers for the compressed cluster read path: - pread_alloc(fd, offset, len) allocates a buffer and fills it with pread_exact, returning the owned Vec. - decompress_cluster(compressed, cluster_size, decoder) allocates the output buffer, decodes via the Decoder trait, and validates that the decoder produced exactly cluster_size bytes. These will be used by QcowSync, QcowAsync, Qcow2Backing, and the legacy QcowFile. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>