Server IP : 162.213.251.212 / Your IP : 18.222.77.149 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/home/allssztx/needapair.com/node_modules/pizzip/es6/ |
Upload File : |
"use strict"; const DataReader = require("./dataReader.js"); function ArrayReader(data) { if (data) { this.data = data; this.length = this.data.length; this.index = 0; this.zero = 0; for (let i = 0; i < this.data.length; i++) { data[i] &= data[i]; } } } ArrayReader.prototype = new DataReader(); /** * @see DataReader.byteAt */ ArrayReader.prototype.byteAt = function (i) { return this.data[this.zero + i]; }; /** * @see DataReader.lastIndexOfSignature */ ArrayReader.prototype.lastIndexOfSignature = function (sig) { const sig0 = sig.charCodeAt(0), sig1 = sig.charCodeAt(1), sig2 = sig.charCodeAt(2), sig3 = sig.charCodeAt(3); for (let i = this.length - 4; i >= 0; --i) { if ( this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3 ) { return i - this.zero; } } return -1; }; /** * @see DataReader.readData */ ArrayReader.prototype.readData = function (size) { this.checkOffset(size); if (size === 0) { return []; } const result = this.data.slice( this.zero + this.index, this.zero + this.index + size ); this.index += size; return result; }; module.exports = ArrayReader;