/var/www/greso.tech/server/nsm/node_modules/pngjs/lib
NameSizeModeActions
bitmapper.js64770644editdlrm
bitpacker.js46700644editdlrm
chunkstream.js42490644editdlrm
constants.js6620644editdlrm
crc.js8530644editdlrm
filter-pack.js42790644editdlrm
filter-parse-async.js5580644editdlrm
filter-parse-sync.js4830644editdlrm
filter-parse.js47980644editdlrm
format-normaliser.js23290644editdlrm
interlace.js20040644editdlrm
packer-async.js11620644editdlrm
packer-sync.js11930644editdlrm
packer.js37230644editdlrm
paeth-predictor.js3720644editdlrm
parser-async.js43170644editdlrm
parser-sync.js25430644editdlrm
parser.js77200644editdlrm
png-sync.js2520644editdlrm
png.js44180644editdlrm
sync-inflate.js37510644editdlrm
sync-reader.js11160644editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/pngjs/lib/sync-reader.js (1116B)
"use strict"; let SyncReader = (module.exports = function (buffer) { this._buffer = buffer; this._reads = []; }); SyncReader.prototype.read = function (length, callback) { this._reads.push({ length: Math.abs(length), // if length < 0 then at most this length allowLess: length < 0, func: callback, }); }; SyncReader.prototype.process = function () { // as long as there is any data and read requests while (this._reads.length > 0 && this._buffer.length) { let read = this._reads[0]; if ( this._buffer.length && (this._buffer.length >= read.length || read.allowLess) ) { // ok there is any data so that we can satisfy this request this._reads.shift(); // == read let buf = this._buffer; this._buffer = buf.slice(read.length); read.func.call(this, buf.slice(0, read.length)); } else { break; } } if (this._reads.length > 0) { return new Error("There are some read requests waitng on finished stream"); } if (this._buffer.length > 0) { return new Error("unrecognised content at end of stream"); } };