]> git.proxmox.com Git - qemu.git/commit
Add xbzrle_encode_buffer and xbzrle_decode_buffer functions
authorOrit Wasserman <owasserm@redhat.com>
Mon, 6 Aug 2012 18:42:52 +0000 (21:42 +0300)
committerJuan Quintela <quintela@redhat.com>
Wed, 8 Aug 2012 11:51:12 +0000 (13:51 +0200)
commit302dfbeb21fc5154c24ca50d296e865a3778c7da
treedc58664ea559e0482b8304d26fdf87aee1b9e1b8
parente6546bb938f5326269b6669d6cbb44d72458caa4
Add xbzrle_encode_buffer and xbzrle_decode_buffer functions

For performance we are encoding long word at a time.
For nzrun we use long-word-at-a-time NULL-detection tricks from strcmp():
using ((lword - 0x0101010101010101) & (~lword) & 0x8080808080808080) test
to find out if any byte in the long word is zero.

Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com>
Signed-off-by: Petter Svard <petters@cs.umu.se>
Signed-off-by: Aidan Shribman <aidan.shribman@sap.com>
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
migration.h
savevm.c