[no subject]

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


#define THRESHOLD    2              /* LZ encode string into pos and length
				       if match size is greater than this */

The actual length of a compressed chunk will be +3 instead of +2 as it reads
in the docs. Attached patch corrects this mistake.

-----Oorspronkelijk bericht-----
Van: conductors-owner@xxxxxxxxxx
[mailto:conductors-owner@xxxxxxxxxx Peter Wang
Verzonden: zaterdag 6 juli 2002 14:26
Aan: conductors@xxxxxxxxxx
Onderwerp: Re: [AD] packfile format description


On 2002-06-26, Peter Wang <tjaden@xxxxxxxxxx> wrote:
> I did a mini write-up of the packfile format.

Committed to trunk.


------=_NextPart_000_0000_01C25AA7.F25A7D10
Content-Type: application/octet-stream;
	name="packfile.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="packfile.diff"

--- packfile._tx	2002-07-08 11:50:56.000000000 +0000
+++ packfile._tx	2002-09-10 11:58:16.000000000 +0000
@@ -64,11 +64,11 @@
    byte sequence containing an index and a length. The index is the =
first
    byte OR'd together with the higher 4 bits of the second byte as the =
higher
    order bits, thus making a 12-bit unsigned number (0-4095). The =
length is
-   the lower 4 bits of the second byte, plus 2.
+   the lower 4 bits of the second byte, plus 3.
    In less hand-wavy C syntax:
 <codeblock>
-      index  =3D byte1 | ((byte2 & 0xF0) << 4);
-      length =3D (byte2 & 0x0F) + 2;
+      index  =3D byte1 | ((byte2 & 0xF0) &lt&lt 4);
+      length =3D (byte2 & 0x0F) + 3;
 <endblock>
    Then, "length" number of bytes from the ring buffer, starting at =
"index",
    are to be sent to the output. In addition, all these bytes must be =
put

------=_NextPart_000_0000_01C25AA7.F25A7D10--



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/