Before this patch, there was an error in encoder when set streamSize to true:
Uncaught RangeError RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 0. Received 2
at __node_internal_captureLargerStackTrace (internal/errors:464:5)
at NodeError (internal/errors:371:5)
at boundsError (internal/buffer:86:9)
at checkBounds (internal/buffer:55:5)
at checkInt (internal/buffer:74:3)
at writeU_Int32LE (internal/buffer:692:3)
at writeInt32LE (internal/buffer:861:10)
This PR fixed the error and also added a simple test.
Before this patch, there was an error in encoder when set
streamSize
totrue
:This PR fixed the error and also added a simple test.