buffer-slice
Slice a buffer into an array of sub-buffers of a specified size.
Very handy for UDP packets.
install
npm install buffer-slice
api
[Buffer buffers] = bufferSlice(Buffer buffer, int maxLengthOfSlice);
example
var bufferSlice = ; //slice a length 5 buffer into max length 2var buffers = ;console;//<Buffer 1 2>//<Buffer 3 4>//<Buffer 5>
license
MIT