Revision ebf7bba090e617fd841177e6ea3de3a129c31a97 authored by Vladimir Sementsov-Ogievskiy on 14 July 2016, 16:59:25 UTC, committed by Max Reitz on 26 July 2016, 15:46:37 UTC
There are no needs to allocate more than one cluster, as we set
avail_out for deflate to one cluster.

Zlib docs (http://www.zlib.net/manual.html) says:
"deflate compresses as much data as possible, and stops when the input
buffer becomes empty or the output buffer becomes full."

So, deflate will not write more than avail_out to output buffer. If
there is not enough space in output buffer for compressed data (it may
be larger than input data) deflate just returns Z_OK. (if all data is
compressed and written to output buffer deflate returns Z_STREAM_END).

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 1468515565-81313-1-git-send-email-vsementsov@virtuozzo.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
1 parent f49ee63
History
File Mode Size
keymaps
optionrom
s390-ccw
spapr-rtas
Makefile -rw-r--r-- 236 bytes
QEMU,cgthree.bin -rw-r--r-- 850 bytes
QEMU,tcx.bin -rw-r--r-- 1.4 KB
README -rw-r--r-- 1.9 KB
acpi-dsdt.aml -rw-r--r-- 4.3 KB
bamboo.dtb -rw-r--r-- 3.1 KB
bamboo.dts -rw-r--r-- 4.5 KB
bios-256k.bin -rw-r--r-- 256.0 KB
bios.bin -rw-r--r-- 128.0 KB
efi-e1000.rom -rw-r--r-- 204.5 KB
efi-e1000e.rom -rw-r--r-- 204.5 KB
efi-eepro100.rom -rw-r--r-- 205.0 KB
efi-ne2k_pci.rom -rw-r--r-- 203.5 KB
efi-pcnet.rom -rw-r--r-- 203.5 KB
efi-rtl8139.rom -rw-r--r-- 206.5 KB
efi-virtio.rom -rw-r--r-- 206.5 KB
efi-vmxnet3.rom -rw-r--r-- 200.5 KB
kvmvapic.bin -rw-r--r-- 9.0 KB
linuxboot.bin -rw-r--r-- 1.0 KB
linuxboot_dma.bin -rw-r--r-- 1.0 KB
multiboot.bin -rw-r--r-- 1.0 KB
openbios-ppc -rw-r--r-- 733.2 KB
openbios-sparc32 -rw-r--r-- 372.6 KB
openbios-sparc64 -rw-r--r-- 1.5 MB
palcode-clipper -rwxr-xr-x 130.4 KB
petalogix-ml605.dtb -rw-r--r-- 9.7 KB
petalogix-s3adsp1800.dtb -rw-r--r-- 8.1 KB
ppc_rom.bin -rw-r--r-- 1.0 MB
pxe-e1000.rom -rw-r--r-- 65.5 KB
pxe-eepro100.rom -rw-r--r-- 60.0 KB
pxe-ne2k_pci.rom -rw-r--r-- 60.0 KB
pxe-pcnet.rom -rw-r--r-- 60.0 KB
pxe-rtl8139.rom -rw-r--r-- 60.0 KB
pxe-virtio.rom -rw-r--r-- 59.0 KB
qemu-icon.bmp -rw-r--r-- 630 bytes
qemu-nsis.bmp -rw-r--r-- 150.9 KB
qemu-nsis.ico -rw-r--r-- 4.7 KB
qemu.rsrc -rw-r--r-- 131.5 KB
qemu_logo.svg -rw-r--r-- 31.7 KB
qemu_logo_no_text.svg -rw-r--r-- 30.2 KB
s390-ccw.img -rw-r--r-- 25.8 KB
sgabios.bin -rw-r--r-- 4.0 KB
slof.bin -rw-r--r-- 902.2 KB
spapr-rtas.bin -rw-r--r-- 20 bytes
u-boot.e500 -rwxr-xr-x 339.6 KB
vgabios-cirrus.bin -rw-r--r-- 37.5 KB
vgabios-qxl.bin -rw-r--r-- 38.0 KB
vgabios-stdvga.bin -rw-r--r-- 38.0 KB
vgabios-virtio.bin -rw-r--r-- 38.0 KB
vgabios-vmware.bin -rw-r--r-- 38.0 KB
vgabios.bin -rw-r--r-- 37.5 KB

README

back to top