From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smm3N-0005u5-Jh for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:25:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Smm3D-000201-KX for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:25:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Smm3D-0001zc-C3 for qemu-devel@nongnu.org; Thu, 05 Jul 2012 09:24:55 -0400 Message-ID: <4FF59584.4000303@redhat.com> Date: Thu, 05 Jul 2012 07:24:20 -0600 From: Eric Blake MIME-Version: 1.0 References: <1341492709-13897-1-git-send-email-owasserm@redhat.com> <1341492709-13897-3-git-send-email-owasserm@redhat.com> In-Reply-To: <1341492709-13897-3-git-send-email-owasserm@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE8A7B620EABFEF2D47990F48" Subject: Re: [Qemu-devel] [PATCH v15 2/9] Add XBZRLE documentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Orit Wasserman Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, avi@redhat.com, pbonzini@redhat.com, chegu_vinod@hp.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE8A7B620EABFEF2D47990F48 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/05/2012 06:51 AM, Orit Wasserman wrote: > Signed-off-by: Orit Wasserman > --- > docs/xbzrle.txt | 136 +++++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 1 files changed, 136 insertions(+), 0 deletions(-) > create mode 100644 docs/xbzrle.txt >=20 > + > +Example > +old buffer: > +1001 zeros > +05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 00 00 6b 00 6d > +3074 zeros This _still_ doesn't add up to 4096: 1001 + 20 + 3074 =3D 4095 > + > +new buffer: > +1001 zeros > +01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 00 67 00 69 > +3704 zeros Still a transposition error. Also, this still has the flaw that it is too weak of an example - the only unchanged bytes happen to also be zero bytes to begin with; it would be much nicer if the example included at least one non-zero byte that did not change between old and new. > + > +encoded buffer: > + > +encoded length 24 > +e9 07 0f 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 03 01 67 01 01 6= 9 ^^ That says you have a zrun of 3 bytes, but the example only shows a zrun of 2 bytes. It feels like I'm pulling teeth to get a good example. If you will just squash in the following (hand-written) diff below, you will then have 4096 bytes in both old and new buffers, and your encoded buffer listing a zrun of 3 will be correct, plus you will be demonstrating a non-zero byte that remained unchanged. @@ ???,??? @@ Example old buffer: 1001 zeros -05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 00 00 6b 00 6d +05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 68 00 00 6b 00 6d 3074 zeros new buffer: 1001 zeros -01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 00 67 00 69 -3704 zeros +01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 68 00 00 67 00 69 +3074 zeros encoded buffer: --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigE8A7B620EABFEF2D47990F48 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJP9ZWEAAoJEKeha0olJ0NqsxUH/Rei1QtQC3x65KpRJty2xySa 8syL+gSbJAPyAaYiMnE31oHvrePR0Kz9dql73MIR+qxhHNBDapFY1o3qnXL+lvC+ DsGFH8TazD9Rol9fUof5n03rJ3YQe9tMzjzyQSCIxfk0iZk0eRPtERP18+iw/Q7g LMcD3ancM83SWLpkCEhKBtLhozroQlssSFzG4vMV6A1WiY9/d84ZfKlQXz93RXVZ CS+fsLP33Y/9xu5q2EubRYmItf/IXSlRIR/uupMQBmL/UlQPGRg500XzltIyvUeA mVpjQC6HUhl0b9lJxMrlqRePI7yDg28mRHg8DQnLgTcMh8l3KbWJ1WT2zhZ0eQg= =lxsr -----END PGP SIGNATURE----- --------------enigE8A7B620EABFEF2D47990F48--