PHP 8.2.30
Preview: adler32.js Size: 694 B
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/pako/lib/zlib/adler32.js

'use strict';

// Note: adler32 takes 12% for level 0 and 2% for level 6.
// It doesn't worth to make additional optimizationa as in original.
// Small size is preferable.

function adler32(adler, buf, len, pos) {
  var s1 = (adler & 0xffff) |0,
      s2 = ((adler >>> 16) & 0xffff) |0,
      n = 0;

  while (len !== 0) {
    // Set limit ~ twice less than 5552, to keep
    // s2 in 31-bits, because we force signed ints.
    // in other case %= will fail.
    n = len > 2000 ? 2000 : len;
    len -= n;

    do {
      s1 = (s1 + buf[pos++]) |0;
      s2 = (s2 + s1) |0;
    } while (--n);

    s1 %= 65521;
    s2 %= 65521;
  }

  return (s1 | (s2 << 16)) |0;
}


module.exports = adler32;

Directory Contents

Dirs: 0 × Files: 11

Name Size Perms Modified Actions
694 B lrw-r--r-- 2026-02-14 19:19:12
Edit Download
1.32 KB lrw-r--r-- 2026-02-14 19:19:14
Edit Download
790 B lrw-r--r-- 2026-02-14 19:19:12
Edit Download
58.82 KB lrw-r--r-- 2026-02-14 19:19:12
Edit Download
1.25 KB lrw-r--r-- 2026-02-14 19:19:14
Edit Download
11.43 KB lrw-r--r-- 2026-02-14 19:19:14
Edit Download
46.25 KB lrw-r--r-- 2026-02-14 19:19:14
Edit Download
11.29 KB lrw-r--r-- 2026-02-14 19:19:14
Edit Download
577 B lrw-r--r-- 2026-02-14 19:19:14
Edit Download
37.97 KB lrw-r--r-- 2026-02-14 19:19:14
Edit Download
851 B lrw-r--r-- 2026-02-14 19:19:14
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).