index.js
function readPartial(multibuffer) {
  var dataLength = vdecode(multibuffer)
  var read = vdecode.bytes
  if (multibuffer.length < read + dataLength) return [null, multibuffer]
  var first = multibuffer.slice(read, read + dataLength)
  var rest = multibuffer.slice(read + dataLength)
  if (rest.length === 0) rest = null
  return [first, rest]
}
function readPartial(multibuffer) {
  var dataLength = vdecode(multibuffer)
  var read = vdecode.bytes
  if (multibuffer.length < read + dataLength) return [null, multibuffer]
  var first = multibuffer.slice(read, read + dataLength)
  var rest = multibuffer.slice(read + dataLength)
  if (rest.length === 0) rest = null
  return [first, rest]
}
function readPartial ( multibuffer ) { var dataLength = vdecode ( multibuffer ) var read = vdecode . bytes if ( multibuffer . length < read + dataLength ) return [ null , multibuffer ] var first = multibuffer . slice ( read , read + dataLength ) var rest = multibuffer . slice ( read + dataLength ) if ( rest . length === 0 ) rest = null return [ first , rest ] }
Fetch the first encoded buffer from a multibuffer, and the rest of the multibuffer.
@param  {Buffer} multibuffer An encoded multibuffer.
@return {Array}            [Buffer, Buffer] where the first buffer is the first encoded buffer, and the second is the rest of the multibuffer.
Fetch the first encoded buffer from a multibuffer and the rest of the multibuffer .