code: function _int(chunk, type) {
    var b, s = '', i;
    while(this._offset < chunk.length) {
      b = chunk[this._offset];
      if(b === CR && chunk[this._offset + 1] === LF) {
        this._offset += 2;
        i = parseInt(s);
        if(type === BST) {
          if(isNaN(i)) {
            return this._abort(new Error('bad string length'));
          }else if(i > this.maxlen) {
            return this._abort(new Error('string length exceeded'));
          }
        }
        return i;
      }
      s += String.fromCharCode(b);
      ++this._offset;
    }
  }
docs: Read an integer.