Encoding the remaining length
Encoding the remaining length and throwing an exception when the maximum message length is exceeded
Decoding a message remaining length
decoding remaining length throws an error when the remaining length is too long
moving to a more functional style
returning an error from decode instead of throwing
tidying formatting
Refactoring the test names and also using the variables to describe the byte limit values
Bug in the encoding I was using 0xFF instead of 128
added more functions
organising methods for the remaining length
Created a function for reading the remaining bytes from a stream
Back grunting now and also back to the drawing board.