lib/protocol/buffer.js
function Buf(buffer) {
  this._initialSize = 64 * 1024;
  this._stepSize = this._initialSize;
  this._pos = 0;

  if (typeof buffer === 'number') {
    this._initialSize = buffer;
  }
  if (buffer instanceof Buffer) {
    this._buf = buffer;
  } else {
    this._buf = new Buffer(this._initialSize);
  }
}
function Buf(buffer) {
  this._initialSize = 64 * 1024;
  this._stepSize = this._initialSize;
  this._pos = 0;

  if (typeof buffer === 'number') {
    this._initialSize = buffer;
  }
  if (buffer instanceof Buffer) {
    this._buf = buffer;
  } else {
    this._buf = new Buffer(this._initialSize);
  }
}
function Buf ( buffer ) { this . _initialSize = 64 * 1024 ; this . _stepSize = this . _initialSize ; this . _pos = 0 ; if ( typeof buffer === 'number' ) { this . _initialSize = buffer ; } if ( buffer instanceof Buffer ) { this . _buf = buffer ; } else { this . _buf = new Buffer ( this . _initialSize ) ; } }
Helper class to read and write from Buffer object.

@constructor
Helper class to read and write from Buffer object .