abstract-encoding icon indicating copy to clipboard operation
abstract-encoding copied to clipboard

small buffer

Open fanatid opened this issue 9 years ago • 1 comments

API docs says nothing about what encode/decode should to do when buffer is too small. Most of modules that uses this interface throwing errors (for example: buffer.readUInt32BE could throw RangeError), but varint has another behavior Related issue in varint: https://github.com/chrisdickinson/varint/pull/13

cc @chrisdickinson

fanatid avatar Mar 02 '16 09:03 fanatid

ah. yea if you cannot encode the value it should throw. we should put that in the "spec".

mafintosh avatar Mar 02 '16 17:03 mafintosh