/var/www/greso.tech/server/nsm/node_modules/pdf-lib/es/core/streams
NameSizeModeActions
Ascii85Stream.d.ts3390644editdlrm
Ascii85Stream.d.ts.map3650644editdlrm
Ascii85Stream.js27510644editdlrm
Ascii85Stream.js.map24560644editdlrm
AsciiHexStream.d.ts3470644editdlrm
AsciiHexStream.d.ts.map3670644editdlrm
AsciiHexStream.js25260644editdlrm
AsciiHexStream.js.map19600644editdlrm
decode.d.ts2180644editdlrm
decode.d.ts.map2270644editdlrm
decode.js21820644editdlrm
decode.js.map21160644editdlrm
DecodeStream.d.ts9300644editdlrm
DecodeStream.d.ts.map7690644editdlrm
DecodeStream.js49190644editdlrm
DecodeStream.js.map40070644editdlrm
FlateStream.d.ts4330644editdlrm
FlateStream.d.ts.map4560644editdlrm
FlateStream.js164220644editdlrm
FlateStream.js.map154820644editdlrm
LZWStream.d.ts4310644editdlrm
LZWStream.d.ts.map4690644editdlrm
LZWStream.js53360644editdlrm
LZWStream.js.map43110644editdlrm
RunLengthStream.d.ts3260644editdlrm
RunLengthStream.d.ts.map3440644editdlrm
RunLengthStream.js20590644editdlrm
RunLengthStream.js.map14430644editdlrm
Stream.d.ts11810644editdlrm
Stream.d.ts.map11320644editdlrm
Stream.js33490644editdlrm
Stream.js.map29090644editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/pdf-lib/es/core/streams/Stream.js (3349B)
/* * Copyright 2012 Mozilla Foundation * * The Stream class contained in this file is a TypeScript port of the * JavaScript Stream class in Mozilla's pdf.js project, made available * under the Apache 2.0 open source license. */ var Stream = /** @class */ (function () { function Stream(buffer, start, length) { this.bytes = buffer; this.start = start || 0; this.pos = this.start; this.end = !!start && !!length ? start + length : this.bytes.length; } Object.defineProperty(Stream.prototype, "length", { get: function () { return this.end - this.start; }, enumerable: false, configurable: true }); Object.defineProperty(Stream.prototype, "isEmpty", { get: function () { return this.length === 0; }, enumerable: false, configurable: true }); Stream.prototype.getByte = function () { if (this.pos >= this.end) { return -1; } return this.bytes[this.pos++]; }; Stream.prototype.getUint16 = function () { var b0 = this.getByte(); var b1 = this.getByte(); if (b0 === -1 || b1 === -1) { return -1; } return (b0 << 8) + b1; }; Stream.prototype.getInt32 = function () { var b0 = this.getByte(); var b1 = this.getByte(); var b2 = this.getByte(); var b3 = this.getByte(); return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; }; // Returns subarray of original buffer, should only be read. Stream.prototype.getBytes = function (length, forceClamped) { if (forceClamped === void 0) { forceClamped = false; } var bytes = this.bytes; var pos = this.pos; var strEnd = this.end; if (!length) { var subarray = bytes.subarray(pos, strEnd); // `this.bytes` is always a `Uint8Array` here. return forceClamped ? new Uint8ClampedArray(subarray) : subarray; } else { var end = pos + length; if (end > strEnd) { end = strEnd; } this.pos = end; var subarray = bytes.subarray(pos, end); // `this.bytes` is always a `Uint8Array` here. return forceClamped ? new Uint8ClampedArray(subarray) : subarray; } }; Stream.prototype.peekByte = function () { var peekedByte = this.getByte(); this.pos--; return peekedByte; }; Stream.prototype.peekBytes = function (length, forceClamped) { if (forceClamped === void 0) { forceClamped = false; } var bytes = this.getBytes(length, forceClamped); this.pos -= bytes.length; return bytes; }; Stream.prototype.skip = function (n) { if (!n) { n = 1; } this.pos += n; }; Stream.prototype.reset = function () { this.pos = this.start; }; Stream.prototype.moveStart = function () { this.start = this.pos; }; Stream.prototype.makeSubStream = function (start, length) { return new Stream(this.bytes, start, length); }; Stream.prototype.decode = function () { return this.bytes; }; return Stream; }()); export default Stream; //# sourceMappingURL=Stream.js.map