chrisdickinson/varint — pull request #9 by dominictarr (2014-05-26 16:25:38+00:00)
Title: on incomplete buffers, return undefined, and set decode.bytesRead = 0

This is a better way to handle decoding streams than #8
The trouble with throwing errors is that there are way too many ways to make errors,
and they can mean too many things. Overloading errors to mean something else,
and using them is a situation you fully expect to be in often is dangerous.

Instead, just return `undefined`, and set the `decode.bytesRead = 0`,
also I have updated the usage notes regarding parsing incomplete buffers.

I'm also using this pattern in my varstruct module (I'm following all the varint patterns)
So, would also like the opinions of others doing binary parsers /cc @mafintosh