MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / dopt

Function dopt

packages/replay-worker/examples/worker.js:575–595  ·  view source on GitHub ↗
(dat, opt, pre, post, st)

Source from the content-addressed store, hash-verified

573};
574// deflate with opts
575var dopt = function (dat, opt, pre, post, st) {
576 if (!st) {
577 st = { l: 1 };
578 if (opt.dictionary) {
579 var dict = opt.dictionary.subarray(-32768);
580 var newDat = new u8(dict.length + dat.length);
581 newDat.set(dict);
582 newDat.set(dat, dict.length);
583 dat = newDat;
584 st.w = dict.length;
585 }
586 }
587 return dflt(
588 dat,
589 opt.level == null ? 6 : opt.level,
590 opt.mem == null ? (st.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 20) : 12 + opt.mem,
591 pre,
592 post,
593 st,
594 );
595};
596// write bytes
597var wbytes = function (d, b, v) {
598 for (; v; ++b) ((d[b] = v), (v >>>= 8));

Callers 2

worker.jsFile · 0.85
gzipSyncFunction · 0.85

Calls 3

dfltFunction · 0.85
setMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected