UNPKG

@nethesis/phone-island

Version:
3 lines (2 loc) 883 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./vint.js").default;function e(t){this.buffer=t,this.offset=0}e.prototype.nextInt16BE=function(){var t=this.buffer.readInt16BE(this.offset);return this.offset+=2,t},e.prototype.nextUInt8=function(){var t=this.buffer.readUInt8(this.offset);return this.offset+=1,t},e.prototype.nextUIntV=function(){var e=t(this.buffer,this.offset);return this.offset+=e.length,e.value},e.prototype.nextIntV=function(){var e=t(this.buffer,this.offset,!0);return this.offset+=e.length,e.value},e.prototype.nextBuffer=function(t){var e=t?this.buffer.slice(this.offset,this.offset+t):this.buffer.slice(this.offset);return this.offset+=t||this.length,e},Object.defineProperty(e.prototype,"length",{get:function(){return this.buffer.length-this.offset}});var f=e;exports.default=f; //# sourceMappingURL=buffer-reader.js.map