/var/www/greso.tech/server/nsm/node_modules/pdf-lib/cjs/core/streams
NameSizeModeActions
Ascii85Stream.d.ts3390644editdlrm
Ascii85Stream.d.ts.map3650644editdlrm
Ascii85Stream.js28760644editdlrm
Ascii85Stream.js.map24500644editdlrm
AsciiHexStream.d.ts3470644editdlrm
AsciiHexStream.d.ts.map3670644editdlrm
AsciiHexStream.js26510644editdlrm
AsciiHexStream.js.map19540644editdlrm
decode.d.ts2180644editdlrm
decode.d.ts.map2270644editdlrm
decode.js28180644editdlrm
decode.js.map19950644editdlrm
DecodeStream.d.ts9300644editdlrm
DecodeStream.d.ts.map7690644editdlrm
DecodeStream.js50620644editdlrm
DecodeStream.js.map39790644editdlrm
FlateStream.d.ts4330644editdlrm
FlateStream.d.ts.map4560644editdlrm
FlateStream.js165470644editdlrm
FlateStream.js.map154760644editdlrm
LZWStream.d.ts4310644editdlrm
LZWStream.d.ts.map4690644editdlrm
LZWStream.js54610644editdlrm
LZWStream.js.map43050644editdlrm
RunLengthStream.d.ts3260644editdlrm
RunLengthStream.d.ts.map3440644editdlrm
RunLengthStream.js21840644editdlrm
RunLengthStream.js.map14370644editdlrm
Stream.d.ts11810644editdlrm
Stream.d.ts.map11320644editdlrm
Stream.js34290644editdlrm
Stream.js.map29120644editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/pdf-lib/cjs/core/streams/Stream.js (3429B)
"use strict"; /* * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); 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; }()); exports.default = Stream; //# sourceMappingURL=Stream.js.map