at path:
ROOT
/
sistema
/
vendors
/
jszip
/
lib
/
crc32.js
run:
R
W
Run
generate
DIR
2026-04-09 04:12:40
R
W
Run
nodejs
DIR
2026-04-09 04:12:40
R
W
Run
reader
DIR
2026-04-09 04:12:40
R
W
Run
stream
DIR
2026-04-09 04:12:40
R
W
Run
base64.js
3.31 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
compressedObject.js
2.84 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
compressions.js
368 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
crc32.js
1.88 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
defaults.js
284 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
external.js
459 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
flate.js
2.31 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
index.js
1.32 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
license_header.js
392 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
load.js
2.76 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
nodejsUtils.js
1.75 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
object.js
12.23 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
readable-stream-browser.js
427 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
signature.js
294 By
2018-11-08 02:46:18
R
W
Run
Delete
Rename
support.js
1.06 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
utf8.js
7.92 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
utils.js
15.31 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
zipEntries.js
11.62 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
zipEntry.js
11 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
zipObject.js
4.42 KB
2018-11-08 02:46:18
R
W
Run
Delete
Rename
error_log
up
📄
crc32.js
Save
'use strict'; var utils = require('./utils'); /** * The following functions come from pako, from pako/lib/zlib/crc32.js * released under the MIT license, see pako https://github.com/nodeca/pako/ */ // Use ordinary array, since untyped makes no boost here function makeTable() { var c, table = []; for(var n =0; n < 256; n++){ c = n; for(var k =0; k < 8; k++){ c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); } table[n] = c; } return table; } // Create table on load. Just 255 signed longs. Not a problem. var crcTable = makeTable(); function crc32(crc, buf, len, pos) { var t = crcTable, end = pos + len; crc = crc ^ (-1); for (var i = pos; i < end; i++ ) { crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; } return (crc ^ (-1)); // >>> 0; } // That's all for the pako functions. /** * Compute the crc32 of a string. * This is almost the same as the function crc32, but for strings. Using the * same function for the two use cases leads to horrible performances. * @param {Number} crc the starting value of the crc. * @param {String} str the string to use. * @param {Number} len the length of the string. * @param {Number} pos the starting position for the crc32 computation. * @return {Number} the computed crc32. */ function crc32str(crc, str, len, pos) { var t = crcTable, end = pos + len; crc = crc ^ (-1); for (var i = pos; i < end; i++ ) { crc = (crc >>> 8) ^ t[(crc ^ str.charCodeAt(i)) & 0xFF]; } return (crc ^ (-1)); // >>> 0; } module.exports = function crc32wrapper(input, crc) { if (typeof input === "undefined" || !input.length) { return 0; } var isArray = utils.getTypeOf(input) !== "string"; if(isArray) { return crc32(crc|0, input, input.length, 0); } else { return crc32str(crc|0, input, input.length, 0); } };