Protocol description in chapter 9 not accurate #60

mbr opened this Issue Jan 3, 2011 · 1 comment


None yet

2 participants

mbr commented Jan 3, 2011

Each line starts with a 4-byte hex value specifying how long the rest of the line is. Your first line starts with 005b, which is 91 in hex, meaning that 91 bytes remain on that line. The next line starts with 003e, which is 62, so you read the remaining 62 bytes. "

Using git, it seems that the 4 bytes header are included in the length. All my lines were actually 4 bytes "shorter" than described in the book.

This would also be in line with

The first four bytes contain the hex length of the line (including 4 byte line length and trailing newline if present).

@schacon schacon added the Technical label Oct 22, 2014
schacon commented Oct 22, 2014

This is fixed in the second edition. Thanks for pointing it out!

@schacon schacon closed this Oct 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment