From 44f0eadc338f55d3bffe4fccefb1d4241defa418 Mon Sep 17 00:00:00 2001 From: Liang Li Date: Mon, 23 Mar 2015 16:32:19 +0800 Subject: qemu-file: Add compression functions to QEMUFile qemu_put_compression_data() compress the data and put it to QEMUFile. qemu_put_qemu_file() put the data in the buffer of source QEMUFile to destination QEMUFile. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- include/migration/qemu-file.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/migration/qemu-file.h') diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h index 745a850e51..a01c5b817e 100644 --- a/include/migration/qemu-file.h +++ b/include/migration/qemu-file.h @@ -159,6 +159,9 @@ void qemu_put_be32(QEMUFile *f, unsigned int v); void qemu_put_be64(QEMUFile *f, uint64_t v); int qemu_peek_buffer(QEMUFile *f, uint8_t *buf, int size, size_t offset); int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size); +ssize_t qemu_put_compression_data(QEMUFile *f, const uint8_t *p, size_t size, + int level); +int qemu_put_qemu_file(QEMUFile *f_des, QEMUFile *f_src); /* * Note that you can only peek continuous bytes from where the current pointer * is; you aren't guaranteed to be able to peak to +n bytes unless you've -- cgit v1.2.3