src/common/bufferSegment.js
function BufferSegment(buf, offset, count) {
  if (!Buffer.isBuffer(buf)) throw new TypeError('buf must be a buffer');

  this.buffer = buf;
  this.offset = offset || 0;
  this.count = count || buf.length;
}
function BufferSegment(buf, offset, count) {
  if (!Buffer.isBuffer(buf)) throw new TypeError('buf must be a buffer');

  this.buffer = buf;
  this.offset = offset || 0;
  this.count = count || buf.length;
}
function BufferSegment ( buf , offset , count ) { if ( ! Buffer . isBuffer ( buf ) ) throw new TypeError ( 'buf must be a buffer' ) ; this . buffer = buf ; this . offset = offset || 0 ; this . count = count || buf . length ; }
Create a buffer segment
@private
@param {Buffer} buf
@param {number} [offset]
@param {number} [count]
@constructor
Create a buffer segment