aboutsummaryrefslogtreecommitdiff
path: root/include/migration/qemu-file.h
diff options
context:
space:
mode:
authorLiang Li <liang.z.li@intel.com>2015-03-23 16:32:19 +0800
committerJuan Quintela <quintela@redhat.com>2015-05-06 17:36:57 +0200
commit44f0eadc338f55d3bffe4fccefb1d4241defa418 (patch)
tree7e30bfa6c861b46a86638cfac9dc6358be55dfb5 /include/migration/qemu-file.h
parent3fcb38c223510cf88c6101f5d218ce0840d1354c (diff)
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 <liang.z.li@intel.com> Signed-off-by: Yang Zhang <yang.z.zhang@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'include/migration/qemu-file.h')
-rw-r--r--include/migration/qemu-file.h3
1 files changed, 3 insertions, 0 deletions
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