Sign In

@jsonjoy.com/util

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsonjoy.com/util - npm Package Compare versions

Comparing version
1.8.0
to
1.8.1
+1
-1
lib/buffers/b.d.ts

@@ -1,1 +0,1 @@

export declare const b: (...args: number[]) => Uint8Array;
export * from '@jsonjoy.com/buffers/lib/b';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.b = void 0;
const b = (...args) => new Uint8Array(args);
exports.b = b;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/b"), exports);
//# sourceMappingURL=b.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"b.js","sourceRoot":"","sources":["../../src/buffers/b.ts"],"names":[],"mappings":";;;AAAO,MAAM,CAAC,GAAG,CAAC,GAAG,IAAc,EAAE,EAAE,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAAhD,QAAA,CAAC,KAA+C"}
{"version":3,"file":"b.js","sourceRoot":"","sources":["../../src/buffers/b.ts"],"names":[],"mappings":";;;AAAA,qEAA2C"}

@@ -1,2 +0,1 @@

/// <reference types="node" />
export declare const bufferToUint8Array: (buf: Buffer) => Uint8Array;
export * from '@jsonjoy.com/buffers/lib/bufferToUint8Array';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bufferToUint8Array = void 0;
const bufferToUint8Array = (buf) => new Uint8Array(buf.buffer, buf.byteOffset, buf.length);
exports.bufferToUint8Array = bufferToUint8Array;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/bufferToUint8Array"), exports);
//# sourceMappingURL=bufferToUint8Array.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"bufferToUint8Array.js","sourceRoot":"","sources":["../../src/buffers/bufferToUint8Array.ts"],"names":[],"mappings":";;;AAAO,MAAM,kBAAkB,GAAG,CAAC,GAAW,EAAc,EAAE,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AAAzG,QAAA,kBAAkB,sBAAuF"}
{"version":3,"file":"bufferToUint8Array.js","sourceRoot":"","sources":["../../src/buffers/bufferToUint8Array.ts"],"names":[],"mappings":";;;AAAA,sFAA4D"}

@@ -1,1 +0,1 @@

export declare const cmpUint8Array: (a: Uint8Array, b: Uint8Array) => boolean;
export * from '@jsonjoy.com/buffers/lib/cmpUint8Array';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cmpUint8Array = void 0;
const cmpUint8Array = (a, b) => {
const length = a.length;
if (length !== b.length)
return false;
for (let i = 0; i < length; i++)
if (a[i] !== b[i])
return false;
return true;
};
exports.cmpUint8Array = cmpUint8Array;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/cmpUint8Array"), exports);
//# sourceMappingURL=cmpUint8Array.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"cmpUint8Array.js","sourceRoot":"","sources":["../../src/buffers/cmpUint8Array.ts"],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,CAAa,EAAE,CAAa,EAAW,EAAE;IACrE,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IACxB,IAAI,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;IACjE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AALW,QAAA,aAAa,iBAKxB"}
{"version":3,"file":"cmpUint8Array.js","sourceRoot":"","sources":["../../src/buffers/cmpUint8Array.ts"],"names":[],"mappings":";;;AAAA,iFAAuD"}

@@ -1,1 +0,1 @@

export declare const cmpUint8Array2: (a: Uint8Array, b: Uint8Array) => number;
export * from '@jsonjoy.com/buffers/lib/cmpUint8Array2';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cmpUint8Array2 = void 0;
const cmpUint8Array2 = (a, b) => {
const len1 = a.length;
const len2 = b.length;
const len = Math.min(len1, len2);
for (let i = 0; i < len; i++) {
const diffChar = a[i] - b[i];
if (diffChar !== 0)
return diffChar;
}
return len1 - len2;
};
exports.cmpUint8Array2 = cmpUint8Array2;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/cmpUint8Array2"), exports);
//# sourceMappingURL=cmpUint8Array2.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"cmpUint8Array2.js","sourceRoot":"","sources":["../../src/buffers/cmpUint8Array2.ts"],"names":[],"mappings":";;;AAQO,MAAM,cAAc,GAAG,CAAC,CAAa,EAAE,CAAa,EAAU,EAAE;IACrE,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,QAAQ,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC;IACtC,CAAC;IACD,OAAO,IAAI,GAAG,IAAI,CAAC;AACrB,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB"}
{"version":3,"file":"cmpUint8Array2.js","sourceRoot":"","sources":["../../src/buffers/cmpUint8Array2.ts"],"names":[],"mappings":";;;AAAA,kFAAwD"}

@@ -1,1 +0,1 @@

export declare const cmpUint8Array3: (a: Uint8Array, b: Uint8Array) => number;
export * from '@jsonjoy.com/buffers/lib/cmpUint8Array3';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cmpUint8Array3 = void 0;
const cmpUint8Array3 = (a, b) => {
const len1 = a.length;
const len2 = b.length;
const diff = len1 - len2;
if (diff !== 0)
return diff;
for (let i = 0; i < len1; i++) {
const diff = a[i] - b[i];
if (diff !== 0)
return diff;
}
return 0;
};
exports.cmpUint8Array3 = cmpUint8Array3;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/cmpUint8Array3"), exports);
//# sourceMappingURL=cmpUint8Array3.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"cmpUint8Array3.js","sourceRoot":"","sources":["../../src/buffers/cmpUint8Array3.ts"],"names":[],"mappings":";;;AAQO,MAAM,cAAc,GAAG,CAAC,CAAa,EAAE,CAAa,EAAU,EAAE;IACrE,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IACtB,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,IAAI,IAAI,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9B,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,IAAI,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;IAC9B,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAVW,QAAA,cAAc,kBAUzB"}
{"version":3,"file":"cmpUint8Array3.js","sourceRoot":"","sources":["../../src/buffers/cmpUint8Array3.ts"],"names":[],"mappings":";;;AAAA,kFAAwD"}

@@ -1,3 +0,1 @@

export declare const concat: (a: Uint8Array, b: Uint8Array) => Uint8Array;
export declare const concatList: (list: Uint8Array[]) => Uint8Array;
export declare const listToUint8: (list: Uint8Array[]) => Uint8Array;
export * from '@jsonjoy.com/buffers/lib/concat';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listToUint8 = exports.concatList = exports.concat = void 0;
const concat = (a, b) => {
const res = new Uint8Array(a.length + b.length);
res.set(a);
res.set(b, a.length);
return res;
};
exports.concat = concat;
const concatList = (list) => {
const length = list.length;
let size = 0, offset = 0;
for (let i = 0; i < length; i++)
size += list[i].length;
const res = new Uint8Array(size);
for (let i = 0; i < length; i++) {
const item = list[i];
res.set(item, offset);
offset += item.length;
}
return res;
};
exports.concatList = concatList;
const listToUint8 = (list) => {
switch (list.length) {
case 0:
return new Uint8Array(0);
case 1:
return list[0];
default:
return (0, exports.concatList)(list);
}
};
exports.listToUint8 = listToUint8;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/concat"), exports);
//# sourceMappingURL=concat.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../src/buffers/concat.ts"],"names":[],"mappings":";;;AAAO,MAAM,MAAM,GAAG,CAAC,CAAa,EAAE,CAAa,EAAc,EAAE;IACjE,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;IAChD,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACX,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AALW,QAAA,MAAM,UAKjB;AAEK,MAAM,UAAU,GAAG,CAAC,IAAkB,EAAc,EAAE;IAC3D,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAC3B,IAAI,IAAI,GAAG,CAAC,EACV,MAAM,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACxD,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACrB,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACtB,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;IACxB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAZW,QAAA,UAAU,cAYrB;AAEK,MAAM,WAAW,GAAG,CAAC,IAAkB,EAAc,EAAE;IAC5D,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,CAAC;YACJ,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;QAC3B,KAAK,CAAC;YACJ,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB;YACE,OAAO,IAAA,kBAAU,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC;AATW,QAAA,WAAW,eAStB"}
{"version":3,"file":"concat.js","sourceRoot":"","sources":["../../src/buffers/concat.ts"],"names":[],"mappings":";;;AAAA,0EAAgD"}

@@ -1,1 +0,1 @@

export declare const copy: <T extends Uint8Array>(arr: T) => T;
export * from '@jsonjoy.com/buffers/lib/copy';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.copy = void 0;
const copy = (arr) => {
const dupe = new Uint8Array(arr.length);
dupe.set(arr);
return dupe;
};
exports.copy = copy;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/copy"), exports);
//# sourceMappingURL=copy.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../src/buffers/copy.ts"],"names":[],"mappings":";;;AAAO,MAAM,IAAI,GAAG,CAAuB,GAAM,EAAK,EAAE;IACtD,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,CAAM,CAAC;IAC7C,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACd,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAJW,QAAA,IAAI,QAIf"}
{"version":3,"file":"copy.js","sourceRoot":"","sources":["../../src/buffers/copy.ts"],"names":[],"mappings":";;;AAAA,wEAA8C"}

@@ -1,1 +0,1 @@

export declare const decodeF16: (binary: number) => number;
export * from '@jsonjoy.com/buffers/lib/f16';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeF16 = void 0;
const pow = Math.pow;
const decodeF16 = (binary) => {
const exponent = (binary & 0x7c00) >> 10;
const fraction = binary & 0x03ff;
return ((binary >> 15 ? -1 : 1) *
(exponent
? exponent === 0x1f
? fraction
? NaN
: Infinity
: pow(2, exponent - 15) * (1 + fraction / 0x400)
: 6.103515625e-5 * (fraction / 0x400)));
};
exports.decodeF16 = decodeF16;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/f16"), exports);
//# sourceMappingURL=f16.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"f16.js","sourceRoot":"","sources":["../../src/buffers/f16.ts"],"names":[],"mappings":";;;AAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;AAEd,MAAM,SAAS,GAAG,CAAC,MAAc,EAAU,EAAE;IAClD,MAAM,QAAQ,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;IACjC,OAAO,CACL,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC,QAAQ;YACP,CAAC,CAAC,QAAQ,KAAK,IAAI;gBACjB,CAAC,CAAC,QAAQ;oBACR,CAAC,CAAC,GAAG;oBACL,CAAC,CAAC,QAAQ;gBACZ,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,GAAG,KAAK,CAAC;YAClD,CAAC,CAAC,cAAc,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC,CACzC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,SAAS,aAapB"}
{"version":3,"file":"f16.js","sourceRoot":"","sources":["../../src/buffers/f16.ts"],"names":[],"mappings":";;;AAAA,uEAA6C"}

@@ -1,1 +0,1 @@

export declare const isArrayBuffer: (value: unknown) => value is ArrayBuffer;
export * from '@jsonjoy.com/buffers/lib/isArrayBuffer';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isArrayBuffer = void 0;
const isArrayBuffer = (value) => {
return value instanceof ArrayBuffer || toString.call(value) === '[object ArrayBuffer]';
};
exports.isArrayBuffer = isArrayBuffer;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/isArrayBuffer"), exports);
//# sourceMappingURL=isArrayBuffer.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"isArrayBuffer.js","sourceRoot":"","sources":["../../src/buffers/isArrayBuffer.ts"],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,KAAc,EAAwB,EAAE;IACpE,OAAO,KAAK,YAAY,WAAW,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,sBAAsB,CAAC;AACzF,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB"}
{"version":3,"file":"isArrayBuffer.js","sourceRoot":"","sources":["../../src/buffers/isArrayBuffer.ts"],"names":[],"mappings":";;;AAAA,iFAAuD"}

@@ -1,1 +0,1 @@

export declare const isFloat32: (n: number) => boolean;
export * from '@jsonjoy.com/buffers/lib/isFloat32';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFloat32 = void 0;
const view = new DataView(new ArrayBuffer(4));
const isFloat32 = (n) => {
view.setFloat32(0, n);
return n === view.getFloat32(0);
};
exports.isFloat32 = isFloat32;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/isFloat32"), exports);
//# sourceMappingURL=isFloat32.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"isFloat32.js","sourceRoot":"","sources":["../../src/buffers/isFloat32.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvC,MAAM,SAAS,GAAG,CAAC,CAAS,EAAW,EAAE;IAC9C,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtB,OAAO,CAAC,KAAK,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC,CAAC;AAHW,QAAA,SAAS,aAGpB"}
{"version":3,"file":"isFloat32.js","sourceRoot":"","sources":["../../src/buffers/isFloat32.ts"],"names":[],"mappings":";;;AAAA,6EAAmD"}

@@ -1,1 +0,1 @@

export declare const isUint8Array: (x: unknown) => x is Uint8Array;
export * from '@jsonjoy.com/buffers/lib/isUint8Array';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUint8Array = void 0;
exports.isUint8Array = typeof Buffer === 'function'
? (x) => x instanceof Uint8Array || Buffer.isBuffer(x)
: (x) => x instanceof Uint8Array;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/isUint8Array"), exports);
//# sourceMappingURL=isUint8Array.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"isUint8Array.js","sourceRoot":"","sources":["../../src/buffers/isUint8Array.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GACvB,OAAO,MAAM,KAAK,UAAU;IAC1B,CAAC,CAAC,CAAC,CAAU,EAAmB,EAAE,CAAC,CAAC,YAAY,UAAU,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC,CAAU,EAAmB,EAAE,CAAC,CAAC,YAAY,UAAU,CAAC"}
{"version":3,"file":"isUint8Array.js","sourceRoot":"","sources":["../../src/buffers/isUint8Array.ts"],"names":[],"mappings":";;;AAAA,gFAAsD"}

@@ -1,1 +0,1 @@

export declare const printOctets: (octets: Uint8Array, max?: number) => string;
export * from '@jsonjoy.com/buffers/lib/printOctets';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.printOctets = void 0;
const printOctets = (octets, max = 16) => {
let str = '';
if (!octets.length)
return str;
if (octets[0] < 16)
str += '0';
str += octets[0].toString(16);
for (let i = 1; i < octets.length && i < max; i++) {
const n = octets[i];
str += ' ';
if (n < 16)
str += '0';
str += n.toString(16);
}
if (octets.length > max)
str += `… (${octets.length - max} more)`;
return str;
};
exports.printOctets = printOctets;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/printOctets"), exports);
//# sourceMappingURL=printOctets.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"printOctets.js","sourceRoot":"","sources":["../../src/buffers/printOctets.ts"],"names":[],"mappings":";;;AAAO,MAAM,WAAW,GAAG,CAAC,MAAkB,EAAE,MAAc,EAAE,EAAU,EAAE;IAC1E,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,GAAG,CAAC;IAC/B,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;QAAE,GAAG,IAAI,GAAG,CAAC;IAC/B,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAClD,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QACpB,GAAG,IAAI,GAAG,CAAC;QACX,IAAI,CAAC,GAAG,EAAE;YAAE,GAAG,IAAI,GAAG,CAAC;QACvB,GAAG,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,GAAG;QAAE,GAAG,IAAI,MAAM,MAAM,CAAC,MAAM,GAAG,GAAG,QAAQ,CAAC;IAClE,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAbW,QAAA,WAAW,eAatB"}
{"version":3,"file":"printOctets.js","sourceRoot":"","sources":["../../src/buffers/printOctets.ts"],"names":[],"mappings":";;;AAAA,+EAAqD"}

@@ -1,23 +0,1 @@

import type { IReader, IReaderResettable } from './types';
export declare class Reader implements IReader, IReaderResettable {
uint8: Uint8Array;
view: DataView;
x: number;
reset(uint8: Uint8Array): void;
peek(): number;
peak(): number;
skip(length: number): void;
buf(size: number): Uint8Array;
u8(): number;
i8(): number;
u16(): number;
i16(): number;
u32(): number;
i32(): number;
u64(): bigint;
i64(): bigint;
f32(): number;
f64(): number;
utf8(size: number): string;
ascii(length: number): string;
}
export * from '@jsonjoy.com/buffers/lib/Reader';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Reader = void 0;
const decodeUtf8_1 = require("./utf8/decodeUtf8");
class Reader {
constructor() {
this.uint8 = new Uint8Array([]);
this.view = new DataView(this.uint8.buffer);
this.x = 0;
}
reset(uint8) {
this.x = 0;
this.uint8 = uint8;
this.view = new DataView(uint8.buffer, uint8.byteOffset, uint8.length);
}
peek() {
return this.view.getUint8(this.x);
}
peak() {
return this.peek();
}
skip(length) {
this.x += length;
}
buf(size) {
const end = this.x + size;
const bin = this.uint8.subarray(this.x, end);
this.x = end;
return bin;
}
u8() {
return this.uint8[this.x++];
}
i8() {
return this.view.getInt8(this.x++);
}
u16() {
let x = this.x;
const num = (this.uint8[x++] << 8) + this.uint8[x++];
this.x = x;
return num;
}
i16() {
const num = this.view.getInt16(this.x);
this.x += 2;
return num;
}
u32() {
const num = this.view.getUint32(this.x);
this.x += 4;
return num;
}
i32() {
const num = this.view.getInt32(this.x);
this.x += 4;
return num;
}
u64() {
const num = this.view.getBigUint64(this.x);
this.x += 8;
return num;
}
i64() {
const num = this.view.getBigInt64(this.x);
this.x += 8;
return num;
}
f32() {
const pos = this.x;
this.x += 4;
return this.view.getFloat32(pos);
}
f64() {
const pos = this.x;
this.x += 8;
return this.view.getFloat64(pos);
}
utf8(size) {
const start = this.x;
this.x += size;
return (0, decodeUtf8_1.decodeUtf8)(this.uint8, start, size);
}
ascii(length) {
const uint8 = this.uint8;
let str = '';
const end = this.x + length;
for (let i = this.x; i < end; i++)
str += String.fromCharCode(uint8[i]);
this.x = end;
return str;
}
}
exports.Reader = Reader;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/Reader"), exports);
//# sourceMappingURL=Reader.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"Reader.js","sourceRoot":"","sources":["../../src/buffers/Reader.ts"],"names":[],"mappings":";;;AAAA,kDAA6C;AAG7C,MAAa,MAAM;IAAnB;QACS,UAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;QAC3B,SAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACvC,MAAC,GAAG,CAAC,CAAC;IA4Gf,CAAC;IA1GQ,KAAK,CAAC,KAAiB;QAC5B,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;I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CAAC;IAEM,KAAK,CAAC,MAAc;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;YAAE,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC;QACb,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AA/GD,wBA+GC"}
{"version":3,"file":"Reader.js","sourceRoot":"","sources":["../../src/buffers/Reader.ts"],"names":[],"mappings":";;;AAAA,0EAAgD"}

@@ -1,8 +0,1 @@

export declare class Slice {
readonly uint8: Uint8Array;
readonly view: DataView;
readonly start: number;
readonly end: number;
constructor(uint8: Uint8Array, view: DataView, start: number, end: number);
subarray(): Uint8Array;
}
export * from '@jsonjoy.com/buffers/lib/Slice';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Slice = void 0;
class Slice {
constructor(uint8, view, start, end) {
this.uint8 = uint8;
this.view = view;
this.start = start;
this.end = end;
}
subarray() {
return this.uint8.subarray(this.start, this.end);
}
}
exports.Slice = Slice;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/Slice"), exports);
//# sourceMappingURL=Slice.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"Slice.js","sourceRoot":"","sources":["../../src/buffers/Slice.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;IAChB,YACkB,KAAiB,EACjB,IAAc,EACd,KAAa,EACb,GAAW;QAHX,UAAK,GAAL,KAAK,CAAY;QACjB,SAAI,GAAJ,IAAI,CAAU;QACd,UAAK,GAAL,KAAK,CAAQ;QACb,QAAG,GAAH,GAAG,CAAQ;IAC1B,CAAC;IAEG,QAAQ;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC;CACF;AAXD,sBAWC"}
{"version":3,"file":"Slice.js","sourceRoot":"","sources":["../../src/buffers/Slice.ts"],"names":[],"mappings":";;;AAAA,yEAA+C"}

@@ -1,19 +0,1 @@

export declare class StreamingOctetReader {
protected readonly chunks: Uint8Array[];
protected chunkSize: number;
protected x: number;
size(): number;
push(chunk: Uint8Array): void;
protected assertSize(size: number): void;
u8(): number;
u32(): number;
copy(size: number, dst: Uint8Array, pos: number): void;
copyXor(size: number, dst: Uint8Array, pos: number, mask: [number, number, number, number], maskIndex: number): void;
buf(size: number): Uint8Array;
bufXor(size: number, mask: [number, number, number, number], maskIndex: number): Uint8Array;
skipUnsafe(n: number): void;
skip(n: number): void;
peek(): number;
peak(): number;
utf8(length: number, mask: [number, number, number, number], maskIndex: number): string;
}
export * from '@jsonjoy.com/buffers/lib/StreamingOctetReader';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamingOctetReader = void 0;
const fromCharCode = String.fromCharCode;
class StreamingOctetReader {
constructor() {
this.chunks = [];
this.chunkSize = 0;
this.x = 0;
}
size() {
return this.chunkSize - this.x;
}
push(chunk) {
this.chunks.push(chunk);
this.chunkSize += chunk.length;
}
assertSize(size) {
if (size > this.size())
throw new RangeError('OUT_OF_BOUNDS');
}
u8() {
this.assertSize(1);
const chunk = this.chunks[0];
let x = this.x;
const octet = chunk[x++];
if (x === chunk.length) {
this.chunks.shift();
this.chunkSize -= chunk.length;
x = 0;
}
this.x = x;
return octet;
}
u32() {
const octet0 = this.u8();
const octet1 = this.u8();
const octet2 = this.u8();
const octet3 = this.u8();
return (octet0 * 0x1000000 + (octet1 << 16) + (octet2 << 8)) | octet3;
}
copy(size, dst, pos) {
if (!size)
return;
this.assertSize(size);
const chunk0 = this.chunks[0];
const size0 = Math.min(chunk0.length - this.x, size);
dst.set(chunk0.subarray(this.x, this.x + size0), pos);
size -= size0;
if (size <= 0) {
this.skipUnsafe(size0);
return;
}
let chunkIndex = 1;
while (size > 0) {
const chunk1 = this.chunks[chunkIndex];
const size1 = Math.min(chunk1.length, size);
dst.set(chunk1.subarray(0, size1), pos + size0);
size -= size1;
chunkIndex++;
}
this.skipUnsafe(size);
}
copyXor(size, dst, pos, mask, maskIndex) {
if (!size)
return;
this.assertSize(size);
const chunk0 = this.chunks[0];
let x = this.x;
const size0 = Math.min(chunk0.length - x, size);
const end = x + size0;
for (; x < end;)
dst[pos++] = chunk0[x++] ^ mask[maskIndex++ % 4];
size -= size0;
if (size <= 0) {
this.skipUnsafe(size0);
return;
}
let chunkIndex = 1;
while (size > 0) {
const chunk1 = this.chunks[chunkIndex++];
const size1 = Math.min(chunk1.length, size);
for (let x = 0; x < size1;)
dst[pos++] = chunk1[x++] ^ mask[maskIndex++ % 4];
size -= size1;
}
this.skipUnsafe(size);
}
buf(size) {
this.assertSize(size);
const buf = new Uint8Array(size);
this.copy(size, buf, 0);
return buf;
}
bufXor(size, mask, maskIndex) {
this.assertSize(size);
const buf = new Uint8Array(size);
this.copyXor(size, buf, 0, mask, maskIndex);
return buf;
}
skipUnsafe(n) {
if (!n)
return;
const chunk = this.chunks[0];
const chunkLength = chunk.length;
const remaining = chunkLength - this.x;
if (remaining > n) {
this.x = this.x + n;
return;
}
this.x = 0;
this.chunks.shift();
this.chunkSize -= chunkLength;
n -= remaining;
this.skipUnsafe(n);
}
skip(n) {
this.assertSize(n);
this.skipUnsafe(n);
}
peek() {
this.assertSize(1);
return this.chunks[0][this.x];
}
peak() {
return this.peek();
}
utf8(length, mask, maskIndex) {
this.assertSize(length);
let i = 0;
const points = [];
while (i < length) {
let code = this.u8() ^ mask[maskIndex++ % 4];
i++;
if ((code & 0x80) !== 0) {
const octet2 = (this.u8() ^ mask[maskIndex++ % 4]) & 0x3f;
i++;
if ((code & 0xe0) === 0xc0) {
code = ((code & 0x1f) << 6) | octet2;
}
else {
const octet3 = (this.u8() ^ mask[maskIndex++ % 4]) & 0x3f;
i++;
if ((code & 0xf0) === 0xe0) {
code = ((code & 0x1f) << 12) | (octet2 << 6) | octet3;
}
else {
if ((code & 0xf8) === 0xf0) {
const octet4 = (this.u8() ^ mask[maskIndex++ % 4]) & 0x3f;
i++;
let unit = ((code & 0x07) << 0x12) | (octet2 << 0x0c) | (octet3 << 0x06) | octet4;
if (unit > 0xffff) {
unit -= 0x10000;
const unit0 = ((unit >>> 10) & 0x3ff) | 0xd800;
code = 0xdc00 | (unit & 0x3ff);
points.push(unit0);
}
else {
code = unit;
}
}
}
}
}
points.push(code);
}
return fromCharCode.apply(String, points);
}
}
exports.StreamingOctetReader = StreamingOctetReader;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/StreamingOctetReader"), exports);
//# sourceMappingURL=StreamingOctetReader.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"StreamingOctetReader.js","sourceRoot":"","sources":["../../src/buffers/StreamingOctetReader.ts"],"names":[],"mappings":";;;AAAA,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AAEzC,MAAa,oBAAoB;IAAjC;QACqB,WAAM,GAAiB,EAAE,CAAC;QAGnC,cAAS,GAAW,CAAC,CAAC;QAEtB,MAAC,GAAW,CAAC,CAAC;IA8K1B,CAAC;IA5KQ,IAAI;QACT,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC;IACjC,CAAC;IAEM,IAAI,CAAC,KAAiB;QAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC;IACjC,CAAC;IAES,UAAU,CAAC,IAAY;QAC/B,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;YAAE,MAAM,IAAI,UAAU,CAAC,eAAe,CAAC,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,IAAI,IAAI,CAAC,GAAG,MAAM,CAAC;4BAClF,IAAI,IAAI,GAAG,MAAM,EAAE,CAAC;gCAClB,IAAI,IAAI,OAAO,CAAC;gCAChB,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC;gCAC/C,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;gCAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;4BACrB,CAAC;iCAAM,CAAC;gCACN,IAAI,GAAG,IAAI,CAAC;4BACd,CAAC;wBACH,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,OAAO,YAAY,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;CACF;AApLD,oDAoLC"}
{"version":3,"file":"StreamingOctetReader.js","sourceRoot":"","sources":["../../src/buffers/StreamingOctetReader.ts"],"names":[],"mappings":";;;AAAA,wFAA8D"}

@@ -1,32 +0,1 @@

import { Writer } from './Writer';
import type { IReader, IReaderResettable } from './types';
export declare class StreamingReader implements IReader, IReaderResettable {
protected readonly writer: Writer;
protected dx: number;
constructor(allocSize?: number);
size(): number;
protected assertSize(size: number): void;
push(uint8: Uint8Array): void;
consume(): void;
get uint8(): Uint8Array;
get view(): DataView;
get x(): number;
set x(x: number);
peek(): number;
peak(): number;
skip(length: number): void;
buf(size: number): Uint8Array;
u8(): number;
i8(): number;
u16(): number;
i16(): number;
u32(): number;
i32(): number;
u64(): bigint;
i64(): bigint;
f32(): number;
f64(): number;
utf8(size: number): string;
ascii(length: number): string;
reset(uint8: Uint8Array): void;
}
export * from '@jsonjoy.com/buffers/lib/StreamingReader';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamingReader = void 0;
const Writer_1 = require("./Writer");
const decodeUtf8_1 = require("./utf8/decodeUtf8");
class StreamingReader {
constructor(allocSize = 16 * 1024) {
this.dx = 0;
this.writer = new Writer_1.Writer(allocSize);
}
size() {
return this.writer.x - this.x;
}
assertSize(size) {
if (size > this.size())
throw new RangeError('OUT_OF_BOUNDS');
}
push(uint8) {
this.writer.buf(uint8, uint8.length);
}
consume() {
this.writer.x0 += this.dx;
this.dx = 0;
}
get uint8() {
return this.writer.uint8;
}
get view() {
return this.writer.view;
}
get x() {
return this.writer.x0 + this.dx;
}
set x(x) {
this.dx = x - this.writer.x0;
}
peek() {
this.assertSize(1);
return this.view.getUint8(this.x);
}
peak() {
return this.peek();
}
skip(length) {
this.assertSize(length);
this.x += length;
}
buf(size) {
this.assertSize(size);
const end = this.x + size;
const bin = this.uint8.subarray(this.x, end);
this.x = end;
return bin;
}
u8() {
this.assertSize(1);
return this.view.getUint8(this.x++);
}
i8() {
this.assertSize(1);
return this.view.getInt8(this.x++);
}
u16() {
this.assertSize(2);
const num = this.view.getUint16(this.x);
this.x += 2;
return num;
}
i16() {
this.assertSize(2);
const num = this.view.getInt16(this.x);
this.x += 2;
return num;
}
u32() {
this.assertSize(4);
const num = this.view.getUint32(this.x);
this.x += 4;
return num;
}
i32() {
this.assertSize(4);
const num = this.view.getInt32(this.x);
this.x += 4;
return num;
}
u64() {
this.assertSize(8);
const num = this.view.getBigUint64(this.x);
this.x += 8;
return num;
}
i64() {
this.assertSize(8);
const num = this.view.getBigInt64(this.x);
this.x += 8;
return num;
}
f32() {
this.assertSize(4);
const pos = this.x;
this.x += 4;
return this.view.getFloat32(pos);
}
f64() {
this.assertSize(8);
const pos = this.x;
this.x += 8;
return this.view.getFloat64(pos);
}
utf8(size) {
this.assertSize(size);
const start = this.x;
this.x += size;
return (0, decodeUtf8_1.decodeUtf8)(this.uint8, start, size);
}
ascii(length) {
this.assertSize(length);
const uint8 = this.uint8;
let str = '';
const end = this.x + length;
for (let i = this.x; i < end; i++)
str += String.fromCharCode(uint8[i]);
this.x = end;
return str;
}
reset(uint8) {
this.dx = 0;
this.writer.reset();
this.push(uint8);
}
}
exports.StreamingReader = StreamingReader;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/StreamingReader"), exports);
//# sourceMappingURL=StreamingReader.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"StreamingReader.js","sourceRoot":"","sources":["../../src/buffers/StreamingReader.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAChC,kDAA6C;AAG7C,MAAa,eAAe;IAQ1B,YAAY,YAAoB,EAAE,GAAG,IAAI;QAF/B,OAAE,GAAG,CAAC,CAAC;QAGf,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,SAAS,CAAC,CAAC;IACtC,CAAC;IAKM,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAChC,CAAC;IAOS,UAAU,CAAC,IAAY;QAC/B,IAAI,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE;YAAE,MAAM,IAAI,UAAU,CAAC,eAAe,CAAC,CAAC;IAChE,CAAC;IASM,IAAI,CAAC,KAAiB;QAC3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAMM,OAAO;QACZ,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC;QAC1B,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;IACd,CAAC;IAID,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC3B,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,IAAW,CAAC;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IAClC,CAAC;IAED,IAAW,CAAC,CAAC,CAA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,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;CACF;AAtLD,0CAsLC"}
{"version":3,"file":"StreamingReader.js","sourceRoot":"","sources":["../../src/buffers/StreamingReader.ts"],"names":[],"mappings":";;;AAAA,mFAAyD"}

@@ -1,6 +0,1 @@

export declare const ascii: (txt: TemplateStringsArray | string | [
string
]) => Uint8Array;
export declare const utf8: (txt: TemplateStringsArray | [
string
] | string) => Uint8Array;
export * from '@jsonjoy.com/buffers/lib/strings';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.utf8 = exports.ascii = void 0;
const bufferToUint8Array_1 = require("./bufferToUint8Array");
const ascii = (txt) => {
if (typeof txt === 'string')
return (0, exports.ascii)([txt]);
[txt] = txt;
const len = txt.length;
const res = new Uint8Array(len);
for (let i = 0; i < len; i++)
res[i] = txt.charCodeAt(i);
return res;
};
exports.ascii = ascii;
const utf8 = (txt) => {
if (typeof txt === 'string')
return (0, exports.utf8)([txt]);
[txt] = txt;
return (0, bufferToUint8Array_1.bufferToUint8Array)(Buffer.from(txt, 'utf8'));
};
exports.utf8 = utf8;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/strings"), exports);
//# sourceMappingURL=strings.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../src/buffers/strings.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AAEjD,MAAM,KAAK,GAAG,CAAC,GAA6C,EAAc,EAAE;IACjF,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAA,aAAK,EAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACZ,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;IACvB,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE;QAAE,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACzD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAPW,QAAA,KAAK,SAOhB;AAEK,MAAM,IAAI,GAAG,CAAC,GAA6C,EAAc,EAAE;IAChF,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAA,YAAI,EAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAChD,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACZ,OAAO,IAAA,uCAAkB,EAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC;AAJW,QAAA,IAAI,QAIf"}
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../src/buffers/strings.ts"],"names":[],"mappings":";;;AAAA,2EAAiD"}

@@ -1,1 +0,1 @@

export declare const toBuf: (str: string) => Uint8Array;
export * from '@jsonjoy.com/buffers/lib/toBuf';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toBuf = void 0;
const encode_1 = require("./utf8/encode");
const toBuf = (str) => {
const maxLength = str.length * 4;
const arr = new Uint8Array(maxLength);
const strBufferLength = (0, encode_1.encode)(arr, str, 0, maxLength);
return arr.slice(0, strBufferLength);
};
exports.toBuf = toBuf;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/toBuf"), exports);
//# sourceMappingURL=toBuf.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"toBuf.js","sourceRoot":"","sources":["../../src/buffers/toBuf.ts"],"names":[],"mappings":";;;AAAA,0CAAqC;AAE9B,MAAM,KAAK,GAAG,CAAC,GAAW,EAAc,EAAE;IAC/C,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,eAAe,GAAG,IAAA,eAAM,EAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;IACvD,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;AACvC,CAAC,CAAC;AALW,QAAA,KAAK,SAKhB"}
{"version":3,"file":"toBuf.js","sourceRoot":"","sources":["../../src/buffers/toBuf.ts"],"names":[],"mappings":";;;AAAA,yEAA+C"}

@@ -1,1 +0,1 @@

export declare const toUint8Array: (data: unknown) => Uint8Array;
export * from '@jsonjoy.com/buffers/lib/toUint8Array';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toUint8Array = void 0;
const toUint8Array = (data) => {
if (data instanceof Uint8Array)
return data;
if (data instanceof ArrayBuffer)
return new Uint8Array(data);
if (Array.isArray(data))
return new Uint8Array(data);
if (typeof Buffer === 'function') {
if (Buffer.isBuffer(data))
return data;
return Buffer.from(data);
}
throw new Error('UINT8ARRAY_INCOMPATIBLE');
};
exports.toUint8Array = toUint8Array;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/toUint8Array"), exports);
//# sourceMappingURL=toUint8Array.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"toUint8Array.js","sourceRoot":"","sources":["../../src/buffers/toUint8Array.ts"],"names":[],"mappings":";;;AAAO,MAAM,YAAY,GAAG,CAAC,IAAa,EAAc,EAAE;IACxD,IAAI,IAAI,YAAY,UAAU;QAAE,OAAO,IAAI,CAAC;IAC5C,IAAI,IAAI,YAAY,WAAW;QAAE,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7D,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IACrD,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QACvC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAW,CAAC,CAAC;IAClC,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC7C,CAAC,CAAC;AATW,QAAA,YAAY,gBASvB"}
{"version":3,"file":"toUint8Array.js","sourceRoot":"","sources":["../../src/buffers/toUint8Array.ts"],"names":[],"mappings":";;;AAAA,gFAAsD"}

@@ -1,55 +0,1 @@

import type { Slice } from './Slice';
export interface IWriter {
uint8: Uint8Array;
view: DataView;
x0: number;
x: number;
u8(char: number): void;
u16(word: number): void;
u32(dword: number): void;
i32(dword: number): void;
u64(qword: number | bigint): void;
u8u16(u8: number, u16: number): void;
u8u32(u8: number, u32: number): void;
u8u64(u8: number, u64: number | bigint): void;
u8f32(u8: number, f64: number): void;
u8f64(u8: number, f64: number): void;
f64(dword: number): void;
buf(buf: Uint8Array, length: number): void;
utf8(str: string): number;
ascii(str: string): void;
}
export interface IWriterGrowable {
reset(): void;
ensureCapacity(capacity: number): void;
move(length: number): void;
flush(): Uint8Array;
flushSlice(): Slice;
newBuffer(size: number): void;
}
export interface IReaderBase {
peek(): number;
peak(): number;
skip(length: number): void;
buf(size: number): Uint8Array;
u8(): number;
i8(): number;
u16(): number;
i16(): number;
u32(): number;
u64(): bigint;
i64(): bigint;
i32(): number;
f32(): number;
f64(): number;
utf8(size: number): string;
ascii(length: number): string;
}
export interface IReader extends IReaderBase {
uint8: Uint8Array;
view: DataView;
x: number;
}
export interface IReaderResettable {
reset(uint8: Uint8Array): void;
}
export * from '@jsonjoy.com/buffers/lib/types';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/types"), exports);
//# sourceMappingURL=types.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/buffers/types.ts"],"names":[],"mappings":""}
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/buffers/types.ts"],"names":[],"mappings":";;;AAAA,yEAA+C"}

@@ -1,6 +0,1 @@

export declare class Uint8ArrayCut {
readonly uint8: Uint8Array;
readonly start: number;
readonly size: number;
constructor(uint8: Uint8Array, start: number, size: number);
}
export * from '@jsonjoy.com/buffers/lib/Uint8ArrayCut';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Uint8ArrayCut = void 0;
class Uint8ArrayCut {
constructor(uint8, start, size) {
this.uint8 = uint8;
this.start = start;
this.size = size;
}
}
exports.Uint8ArrayCut = Uint8ArrayCut;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/Uint8ArrayCut"), exports);
//# sourceMappingURL=Uint8ArrayCut.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"Uint8ArrayCut.js","sourceRoot":"","sources":["../../src/buffers/Uint8ArrayCut.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAa;IACxB,YACkB,KAAiB,EACjB,KAAa,EACb,IAAY;QAFZ,UAAK,GAAL,KAAK,CAAY;QACjB,UAAK,GAAL,KAAK,CAAQ;QACb,SAAI,GAAJ,IAAI,CAAQ;IAC3B,CAAC;CACL;AAND,sCAMC"}
{"version":3,"file":"Uint8ArrayCut.js","sourceRoot":"","sources":["../../src/buffers/Uint8ArrayCut.ts"],"names":[],"mappings":";;;AAAA,iFAAuD"}

@@ -1,7 +0,1 @@

export declare class CachedUtf8Decoder {
private readonly caches;
constructor();
private get;
private store;
decode(bytes: Uint8Array, offset: number, size: number): string;
}
export * from '@jsonjoy.com/buffers/lib/utf8/CachedUtf8Decoder';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CachedUtf8Decoder = void 0;
const tslib_1 = require("tslib");
const v10_1 = tslib_1.__importDefault(require("./decodeUtf8/v10"));
let x = 1 + Math.round(Math.random() * ((-1 >>> 0) - 1));
function randomU32(min, max) {
x ^= x << 13;
x ^= x >>> 17;
x ^= x << 5;
return ((x >>> 0) % (max - min + 1)) + min;
}
class CacheItem {
constructor(bytes, value) {
this.bytes = bytes;
this.value = value;
}
}
class CachedUtf8Decoder {
constructor() {
this.caches = [];
for (let i = 0; i < 31; i++)
this.caches.push([]);
}
get(bytes, offset, size) {
const records = this.caches[size - 1];
const len = records.length;
FIND_CHUNK: for (let i = 0; i < len; i++) {
const record = records[i];
const recordBytes = record.bytes;
for (let j = 0; j < size; j++)
if (recordBytes[j] !== bytes[offset + j])
continue FIND_CHUNK;
return record.value;
}
return null;
}
store(bytes, value) {
const records = this.caches[bytes.length - 1];
const record = new CacheItem(bytes, value);
const length = records.length;
if (length >= 16)
records[randomU32(0, 16 - 1)] = record;
else
records.push(record);
}
decode(bytes, offset, size) {
if (!size)
return '';
const cachedValue = this.get(bytes, offset, size);
if (cachedValue !== null)
return cachedValue;
const value = (0, v10_1.default)(bytes, offset, size);
const copy = Uint8Array.prototype.slice.call(bytes, offset, offset + size);
this.store(copy, value);
return value;
}
}
exports.CachedUtf8Decoder = CachedUtf8Decoder;
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/utf8/CachedUtf8Decoder"), exports);
//# sourceMappingURL=CachedUtf8Decoder.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"CachedUtf8Decoder.js","sourceRoot":"","sources":["../../../src/buffers/utf8/CachedUtf8Decoder.ts"],"names":[],"mappings":";;;;AAAA,mEAA0C;AAE1C,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAGzD,SAAS,SAAS,CAAC,GAAW,EAAE,GAAW;IACzC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACb,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACd,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACZ,OAAO,C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CAAC;QAC/C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC9B,IAAI,MAAM,MAA8B;YAAE,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,KAA6B,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;;YACpG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAEM,MAAM,CAAC,KAAiB,EAAE,MAAc,EAAE,IAAY;QAC3D,IAAI,CAAC,IAAI;YAAE,OAAO,EAAE,CAAC;QACrB,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAClD,IAAI,WAAW,KAAK,IAAI;YAAE,OAAO,WAAW,CAAC;QAC7C,MAAM,KAAK,GAAG,IAAA,aAAU,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAE9C,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;QAC3E,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAtCD,8CAsCC"}
{"version":3,"file":"CachedUtf8Decoder.js","sourceRoot":"","sources":["../../../src/buffers/utf8/CachedUtf8Decoder.ts"],"names":[],"mappings":";;;AAAA,0FAAgE"}

@@ -1,2 +0,1 @@

export declare const decodeAscii: (src: Uint8Array, position: number, length: number) => string | undefined;
export declare const decodeAsciiMax15: (src: Uint8Array, position: number, length: number) => string | undefined;
export * from '@jsonjoy.com/buffers/lib/utf8/decodeAscii';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeAsciiMax15 = exports.decodeAscii = void 0;
const fromCharCode = String.fromCharCode;
const decodeAscii = (src, position, length) => {
const bytes = [];
for (let i = 0; i < length; i++) {
const byte = src[position++];
if (byte & 0x80)
return;
bytes.push(byte);
}
return fromCharCode.apply(String, bytes);
};
exports.decodeAscii = decodeAscii;
const decodeAsciiMax15 = (src, position, length) => {
if (length < 4) {
if (length < 2) {
if (length === 0)
return '';
else {
const a = src[position++];
if ((a & 0x80) > 1) {
position -= 1;
return;
}
return fromCharCode(a);
}
}
else {
const a = src[position++];
const b = src[position++];
if ((a & 0x80) > 0 || (b & 0x80) > 0) {
position -= 2;
return;
}
if (length < 3)
return fromCharCode(a, b);
const c = src[position++];
if ((c & 0x80) > 0) {
position -= 3;
return;
}
return fromCharCode(a, b, c);
}
}
else {
const a = src[position++];
const b = src[position++];
const c = src[position++];
const d = src[position++];
if ((a & 0x80) > 0 || (b & 0x80) > 0 || (c & 0x80) > 0 || (d & 0x80) > 0) {
position -= 4;
return;
}
if (length < 6) {
if (length === 4)
return fromCharCode(a, b, c, d);
else {
const e = src[position++];
if ((e & 0x80) > 0) {
position -= 5;
return;
}
return fromCharCode(a, b, c, d, e);
}
}
else if (length < 8) {
const e = src[position++];
const f = src[position++];
if ((e & 0x80) > 0 || (f & 0x80) > 0) {
position -= 6;
return;
}
if (length < 7)
return fromCharCode(a, b, c, d, e, f);
const g = src[position++];
if ((g & 0x80) > 0) {
position -= 7;
return;
}
return fromCharCode(a, b, c, d, e, f, g);
}
else {
const e = src[position++];
const f = src[position++];
const g = src[position++];
const h = src[position++];
if ((e & 0x80) > 0 || (f & 0x80) > 0 || (g & 0x80) > 0 || (h & 0x80) > 0) {
position -= 8;
return;
}
if (length < 10) {
if (length === 8)
return fromCharCode(a, b, c, d, e, f, g, h);
else {
const i = src[position++];
if ((i & 0x80) > 0) {
position -= 9;
return;
}
return fromCharCode(a, b, c, d, e, f, g, h, i);
}
}
else if (length < 12) {
const i = src[position++];
const j = src[position++];
if ((i & 0x80) > 0 || (j & 0x80) > 0) {
position -= 10;
return;
}
if (length < 11)
return fromCharCode(a, b, c, d, e, f, g, h, i, j);
const k = src[position++];
if ((k & 0x80) > 0) {
position -= 11;
return;
}
return fromCharCode(a, b, c, d, e, f, g, h, i, j, k);
}
else {
const i = src[position++];
const j = src[position++];
const k = src[position++];
const l = src[position++];
if ((i & 0x80) > 0 || (j & 0x80) > 0 || (k & 0x80) > 0 || (l & 0x80) > 0) {
position -= 12;
return;
}
if (length < 14) {
if (length === 12)
return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l);
else {
const m = src[position++];
if ((m & 0x80) > 0) {
position -= 13;
return;
}
return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m);
}
}
else {
const m = src[position++];
const n = src[position++];
if ((m & 0x80) > 0 || (n & 0x80) > 0) {
position -= 14;
return;
}
if (length < 15)
return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
const o = src[position++];
if ((o & 0x80) > 0) {
position -= 15;
return;
}
return fromCharCode(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o);
}
}
}
}
};
exports.decodeAsciiMax15 = decodeAsciiMax15;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/utf8/decodeAscii"), exports);
//# sourceMappingURL=decodeAscii.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"decodeAscii.js","sourceRoot":"","sources":["../../../src/buffers/utf8/decodeAscii.ts"],"names":[],"mappings":";;;AAAA,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AA0BlC,MAAM,WAAW,GAAG,CAAC,GAAe,EAAE,QAAgB,EAAE,MAAc,EAAsB,EAAE;IACnG,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC7B,IAAI,IAAI,GAAG,IAAI;YAAE,OAAO;QAC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@ -1,2 +0,1 @@

import decodeUtf8 from './v16';
export { decodeUtf8 };
export * from '@jsonjoy.com/buffers/lib/utf8/decodeUtf8';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeUtf8 = void 0;
const tslib_1 = require("tslib");
const v16_1 = tslib_1.__importDefault(require("./v16"));
exports.decodeUtf8 = v16_1.default;
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/utf8/decodeUtf8"), exports);
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/index.ts"],"names":[],"mappings":";;;;AAAA,wDAA+B;AAEvB,qBAFD,aAAU,CAEC"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/index.ts"],"names":[],"mappings":";;;AAAA,mFAAyD"}

@@ -1,6 +0,1 @@

export type EncodeString = (arr: Uint8Array, str: string, pos: number, maxLength: number) => number;
export declare const encodeUtf8Write: EncodeString;
export declare const encodeFrom: EncodeString;
export declare const encodeNative: EncodeString;
export declare const encodeTe: EncodeString;
export declare const encode: EncodeString;
export * from '@jsonjoy.com/buffers/lib/utf8/encode';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.encode = exports.encodeTe = exports.encodeNative = exports.encodeFrom = exports.encodeUtf8Write = void 0;
const hasBuffer = typeof Buffer !== undefined;
const utf8Write = hasBuffer
? Buffer.prototype.utf8Write
: null;
const from = hasBuffer ? Buffer.from : null;
const encodeUtf8Write = (arr, str, pos, maxLength) => utf8Write.call(arr, str, pos, maxLength);
exports.encodeUtf8Write = encodeUtf8Write;
const encodeFrom = (arr, str, pos, maxLength) => {
const offset = arr.byteOffset + pos;
const buf = from(arr.buffer).subarray(offset, offset + maxLength);
return buf.write(str, 0, maxLength, 'utf8');
};
exports.encodeFrom = encodeFrom;
const encodeNative = (arr, str, pos, maxLength) => {
const length = str.length;
const start = pos;
let curr = 0;
while (curr < length) {
let value = str.charCodeAt(curr++);
if ((value & 0xffffff80) === 0) {
arr[pos++] = value;
continue;
}
else if ((value & 0xfffff800) === 0) {
arr[pos++] = ((value >> 6) & 0x1f) | 0xc0;
}
else {
if (value >= 0xd800 && value <= 0xdbff) {
if (curr < length) {
const extra = str.charCodeAt(curr);
if ((extra & 0xfc00) === 0xdc00) {
curr++;
value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;
}
}
}
if ((value & 0xffff0000) === 0) {
arr[pos++] = ((value >> 12) & 0x0f) | 0xe0;
arr[pos++] = ((value >> 6) & 0x3f) | 0x80;
}
else {
arr[pos++] = ((value >> 18) & 0x07) | 0xf0;
arr[pos++] = ((value >> 12) & 0x3f) | 0x80;
arr[pos++] = ((value >> 6) & 0x3f) | 0x80;
}
}
arr[pos++] = (value & 0x3f) | 0x80;
}
return pos - start;
};
exports.encodeNative = encodeNative;
const textEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder() : null;
const encodeTe = (arr, str, pos, maxLength) => textEncoder.encodeInto(str, arr.subarray(pos, pos + maxLength)).written;
exports.encodeTe = encodeTe;
exports.encode = utf8Write ? exports.encodeUtf8Write : from ? exports.encodeFrom : exports.encodeNative;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/utf8/encode"), exports);
//# sourceMappingURL=encode.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"encode.js","sourceRoot":"","sources":["../../../src/buffers/utf8/encode.ts"],"names":[],"mappings":";;;AAAA,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,SAAS,CAAC;AAC9C,MAAM,SAAS,GAAG,SAAS;IACzB,CAAC,CAAE,MAAM,CAAC,SAAS,CAAC,SAAuF;IAC3G,CAAC,CAAC,IAAI,CAAC;AACT,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAIrC,MAAM,eAAe,GAAiB,CAAC,GAAe,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;IACD,OAAO,GAAG,GAAG,KAAK,CAAC;AACrB,CAAC,CAAC;AAjCW,QAAA,YAAY,gBAiCvB;AAEF,MAAM,WAAW,GAAG,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAE3E,MAAM,QAAQ,GAAiB,CAAC,GAAe,EAAE,GAAW,EAAE,GAAW,EAAE,SAAiB,EAAU,EAAE,CAC7G,WAAY,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,OAAQ,CAAC;AAD/D,QAAA,QAAQ,YACuD;AAE/D,QAAA,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,uBAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAU,CAAC,CAAC,CAAC,oBAAY,CAAC"}
{"version":3,"file":"encode.js","sourceRoot":"","sources":["../../../src/buffers/utf8/encode.ts"],"names":[],"mappings":";;;AAAA,+EAAqD"}

@@ -0,1 +1,2 @@

export * from '@jsonjoy.com/buffers/lib/utf8/isUtf8';
export declare const isUtf8: (buf: Uint8Array, from: number, length: number) => boolean;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUtf8 = void 0;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/utf8/isUtf8"), exports);
const isUtf8 = (buf, from, length) => {

@@ -5,0 +7,0 @@ const to = from + length;

@@ -1,1 +0,1 @@

{"version":3,"file":"isUtf8.js","sourceRoot":"","sources":["../../../src/buffers/utf8/isUtf8.ts"],"names":[],"mappings":";;;AAKO,MAAM,MAAM,GAAG,CAAC,GAAe,EAAE,IAAY,EAAE,MAAc,EAAW,EAAE;IAC/E,MAAM,EAAE,GAAG,IAAI,GAAG,MAAM,CAAC;IACzB,OAAO,IAAI,GAAG,EAAE,EAAE,CAAC;QACjB,MAAM,CAAC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I,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC;YACtF,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACxB,CAAC;YACD,IAAI,IAAI,CAAC,CAAC;YACV,SAAS;QACX,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACxG,IAAI,IAAI,CAAC,CAAC;YACV,SAAS;QACX,CAAC;QACD,IACE,CAAC,CAAC,CAAC,KAAK,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,CAAC;YACvC,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,KAAK,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC;YAC3C,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;YACxB,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACxB,CAAC;YACD,IAAI,IAAI,CAAC,CAAC;YACV,SAAS;QACX,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAvCW,QAAA,MAAM,UAuCjB"}

@@ -1,3 +0,1 @@

import { CachedUtf8Decoder } from './CachedUtf8Decoder';
declare const _default: CachedUtf8Decoder;
export default _default;
export * from '@jsonjoy.com/buffers/lib/utf8/sharedCachedUtf8Decoder';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const CachedUtf8Decoder_1 = require("./CachedUtf8Decoder");
exports.default = new CachedUtf8Decoder_1.CachedUtf8Decoder();
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/utf8/sharedCachedUtf8Decoder"), exports);
//# sourceMappingURL=sharedCachedUtf8Decoder.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"sharedCachedUtf8Decoder.js","sourceRoot":"","sources":["../../../src/buffers/utf8/sharedCachedUtf8Decoder.ts"],"names":[],"mappings":";;AAAA,2DAAsD;AAEtD,kBAAe,IAAI,qCAAiB,EAAE,CAAC"}
{"version":3,"file":"sharedCachedUtf8Decoder.js","sourceRoot":"","sources":["../../../src/buffers/utf8/sharedCachedUtf8Decoder.ts"],"names":[],"mappings":";;;AAAA,gGAAsE"}

@@ -1,33 +0,1 @@

import { Slice } from './Slice';
import { IWriterGrowable, IWriter } from './types';
export declare class Writer implements IWriter, IWriterGrowable {
allocSize: number;
uint8: Uint8Array;
view: DataView;
x0: number;
x: number;
protected size: number;
constructor(allocSize?: number);
protected grow(size: number): void;
ensureCapacity(capacity: number): void;
move(capacity: number): void;
reset(): void;
newBuffer(size: number): void;
flush(): Uint8Array;
flushSlice(): Slice;
u8(char: number): void;
u16(word: number): void;
u32(dword: number): void;
i32(dword: number): void;
u64(qword: number | bigint): void;
f64(float: number): void;
u8u16(u8: number, u16: number): void;
u8u32(u8: number, u32: number): void;
u8u64(u8: number, u64: number | bigint): void;
u8f32(u8: number, f32: number): void;
u8f64(u8: number, f64: number): void;
buf(buf: Uint8Array, length: number): void;
utf8(str: string): number;
utf8Native(str: string): number;
ascii(str: string): void;
}
export * from '@jsonjoy.com/buffers/lib/Writer';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Writer = void 0;
const Slice_1 = require("./Slice");
const EMPTY_UINT8 = new Uint8Array([]);
const EMPTY_VIEW = new DataView(EMPTY_UINT8.buffer);
const hasBuffer = typeof Buffer === 'function';
const utf8Write = hasBuffer
? Buffer.prototype.utf8Write
: null;
const from = hasBuffer ? Buffer.from : null;
const textEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder() : null;
class Writer {
constructor(allocSize = 64 * 1024) {
this.allocSize = allocSize;
this.view = EMPTY_VIEW;
this.x0 = 0;
this.x = 0;
this.uint8 = new Uint8Array(allocSize);
this.size = allocSize;
this.view = new DataView(this.uint8.buffer);
}
grow(size) {
const x0 = this.x0;
const x = this.x;
const oldUint8 = this.uint8;
const newUint8 = new Uint8Array(size);
const view = new DataView(newUint8.buffer);
const activeSlice = oldUint8.subarray(x0, x);
newUint8.set(activeSlice, 0);
this.x = x - x0;
this.x0 = 0;
this.uint8 = newUint8;
this.size = size;
this.view = view;
}
ensureCapacity(capacity) {
const byteLength = this.size;
const remaining = byteLength - this.x;
if (remaining < capacity) {
const total = byteLength - this.x0;
const required = capacity - remaining;
const totalRequired = total + required;
this.grow(totalRequired <= this.allocSize ? this.allocSize : totalRequired * 2);
}
}
move(capacity) {
this.ensureCapacity(capacity);
this.x += capacity;
}
reset() {
this.x0 = this.x;
}
newBuffer(size) {
const uint8 = (this.uint8 = new Uint8Array(size));
this.size = size;
this.view = new DataView(uint8.buffer);
this.x = this.x0 = 0;
}
flush() {
const result = this.uint8.subarray(this.x0, this.x);
this.x0 = this.x;
return result;
}
flushSlice() {
const slice = new Slice_1.Slice(this.uint8, this.view, this.x0, this.x);
this.x0 = this.x;
return slice;
}
u8(char) {
this.ensureCapacity(1);
this.uint8[this.x++] = char;
}
u16(word) {
this.ensureCapacity(2);
this.view.setUint16(this.x, word);
this.x += 2;
}
u32(dword) {
this.ensureCapacity(4);
this.view.setUint32(this.x, dword);
this.x += 4;
}
i32(dword) {
this.ensureCapacity(4);
this.view.setInt32(this.x, dword);
this.x += 4;
}
u64(qword) {
this.ensureCapacity(8);
this.view.setBigUint64(this.x, BigInt(qword));
this.x += 8;
}
f64(float) {
this.ensureCapacity(8);
this.view.setFloat64(this.x, float);
this.x += 8;
}
u8u16(u8, u16) {
this.ensureCapacity(3);
let x = this.x;
this.uint8[x++] = u8;
this.uint8[x++] = u16 >>> 8;
this.uint8[x++] = u16 & 0xff;
this.x = x;
}
u8u32(u8, u32) {
this.ensureCapacity(5);
let x = this.x;
this.uint8[x++] = u8;
this.view.setUint32(x, u32);
this.x = x + 4;
}
u8u64(u8, u64) {
this.ensureCapacity(9);
let x = this.x;
this.uint8[x++] = u8;
this.view.setBigUint64(x, BigInt(u64));
this.x = x + 8;
}
u8f32(u8, f32) {
this.ensureCapacity(5);
let x = this.x;
this.uint8[x++] = u8;
this.view.setFloat32(x, f32);
this.x = x + 4;
}
u8f64(u8, f64) {
this.ensureCapacity(9);
let x = this.x;
this.uint8[x++] = u8;
this.view.setFloat64(x, f64);
this.x = x + 8;
}
buf(buf, length) {
this.ensureCapacity(length);
const x = this.x;
this.uint8.set(buf, x);
this.x = x + length;
}
utf8(str) {
const maxLength = str.length * 4;
if (maxLength < 168)
return this.utf8Native(str);
if (utf8Write) {
const writeLength = utf8Write.call(this.uint8, str, this.x, maxLength);
this.x += writeLength;
return writeLength;
}
else if (from) {
const uint8 = this.uint8;
const offset = uint8.byteOffset + this.x;
const buf = from(uint8.buffer).subarray(offset, offset + maxLength);
const writeLength = buf.write(str, 0, maxLength, 'utf8');
this.x += writeLength;
return writeLength;
}
else if (maxLength > 1024 && textEncoder) {
const writeLength = textEncoder.encodeInto(str, this.uint8.subarray(this.x, this.x + maxLength)).written;
this.x += writeLength;
return writeLength;
}
return this.utf8Native(str);
}
utf8Native(str) {
const length = str.length;
const uint8 = this.uint8;
let offset = this.x;
let pos = 0;
while (pos < length) {
let value = str.charCodeAt(pos++);
if ((value & 0xffffff80) === 0) {
uint8[offset++] = value;
continue;
}
else if ((value & 0xfffff800) === 0) {
uint8[offset++] = ((value >> 6) & 0x1f) | 0xc0;
}
else {
if (value >= 0xd800 && value <= 0xdbff) {
if (pos < length) {
const extra = str.charCodeAt(pos);
if ((extra & 0xfc00) === 0xdc00) {
pos++;
value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;
}
}
}
if ((value & 0xffff0000) === 0) {
uint8[offset++] = ((value >> 12) & 0x0f) | 0xe0;
uint8[offset++] = ((value >> 6) & 0x3f) | 0x80;
}
else {
uint8[offset++] = ((value >> 18) & 0x07) | 0xf0;
uint8[offset++] = ((value >> 12) & 0x3f) | 0x80;
uint8[offset++] = ((value >> 6) & 0x3f) | 0x80;
}
}
uint8[offset++] = (value & 0x3f) | 0x80;
}
const writeLength = offset - this.x;
this.x = offset;
return writeLength;
}
ascii(str) {
const length = str.length;
this.ensureCapacity(length);
const uint8 = this.uint8;
let x = this.x;
let pos = 0;
while (pos < length)
uint8[x++] = str.charCodeAt(pos++);
this.x = x;
}
}
exports.Writer = Writer;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@jsonjoy.com/buffers/lib/Writer"), exports);
//# sourceMappingURL=Writer.js.map

@@ -1,1 +0,1 @@

{"version":3,"file":"Writer.js","sourceRoot":"","sources":["../../src/buffers/Writer.ts"],"names":[],"mappings":";;;AAAA,mCAA8B;AAG9B,MAAM,WAAW,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,UAAU,GAAG,IAAI,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,UAAU,CAAC;AAC/C,MAAM,SAAS,GAAG,SAAS;IACzB,CAAC,CAAE,MAAM,CAAC,SAAS,CAAC,SAAuF;IAC3G,CAAC,CAAC,IAAI,CAAC;AACT,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5C,MAAM,WAAW,GAAG,OAAO,WAAW,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAOlF,MAAa,MAAM;IAcjB,YAAmB,YAAoB,E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AC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;oBAChD,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;gBACjD,CAAC;YACH,CAAC;YACD,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;QAC1C,CAAC;QACD,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QACpC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC;QAChB,OAAO,WAAW,CAAC;IACrB,CAAC;IAEM,KAAK,CAAC,GAAW;QACtB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACf,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,OAAO,GAAG,GAAG,MAAM;YAAE,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;CACF;AA1PD,wBA0PC"}
{"version":3,"file":"Writer.js","sourceRoot":"","sources":["../../src/buffers/Writer.ts"],"names":[],"mappings":";;;AAAA,0EAAgD"}

@@ -7,3 +7,3 @@ {

},
"version": "1.8.0",
"version": "1.8.1",
"description": "Various helper utilities",

@@ -61,3 +61,5 @@ "author": {

},
"dependencies": {},
"dependencies": {
"@jsonjoy.com/buffers": "^1.0.0"
},
"devDependencies": {

@@ -64,0 +66,0 @@ "@types/benchmark": "^2.1.2",

declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (buf, start, length) => {
let offset = start;
const end = offset + length;
const units = [];
let result = '';
while (offset < end) {
const byte1 = buf[offset++];
if ((byte1 & 0x80) === 0) {
units.push(byte1);
}
else if ((byte1 & 0xe0) === 0xc0) {
const byte2 = buf[offset++] & 0x3f;
units.push(((byte1 & 0x1f) << 6) | byte2);
}
else if ((byte1 & 0xf0) === 0xe0) {
const byte2 = buf[offset++] & 0x3f;
const byte3 = buf[offset++] & 0x3f;
units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);
}
else if ((byte1 & 0xf8) === 0xf0) {
const byte2 = buf[offset++] & 0x3f;
const byte3 = buf[offset++] & 0x3f;
const byte4 = buf[offset++] & 0x3f;
let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;
if (unit > 0xffff) {
unit -= 0x10000;
units.push(((unit >>> 10) & 0x3ff) | 0xd800);
unit = 0xdc00 | (unit & 0x3ff);
}
units.push(unit);
}
else {
units.push(byte1);
}
if (units.length >= 1000) {
result += String.fromCharCode(...units);
units.length = 0;
}
}
if (units.length > 0)
result += String.fromCharCode(...units);
return result;
};
//# sourceMappingURL=v1.js.map
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v1.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACxE,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,MAAM,GAAG,GAAG,EAAE,CAAC;QACpB,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CA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O,CAAC;gBAChB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;gBAC7C,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;YACjC,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC;YACzB,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC;YACxC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fromCharCode = String.fromCharCode;
exports.default = (buf, start, length) => {
let offset = start;
const end = offset + length;
let str = '';
while (offset < end) {
const octet1 = buf[offset++];
if ((octet1 & 0x80) === 0) {
str += fromCharCode(octet1);
continue;
}
const octet2 = buf[offset++] & 0x3f;
if ((octet1 & 0xe0) === 0xc0) {
str += fromCharCode(((octet1 & 0x1f) << 6) | octet2);
continue;
}
const octet3 = buf[offset++] & 0x3f;
if ((octet1 & 0xf0) === 0xe0) {
str += fromCharCode(((octet1 & 0x1f) << 12) | (octet2 << 6) | octet3);
continue;
}
if ((octet1 & 0xf8) === 0xf0) {
const octet4 = buf[offset++] & 0x3f;
let unit = ((octet1 & 0x07) << 0x12) | (octet2 << 0x0c) | (octet3 << 0x06) | octet4;
if (unit > 0xffff) {
unit -= 0x10000;
const unit0 = ((unit >>> 10) & 0x3ff) | 0xd800;
unit = 0xdc00 | (unit & 0x3ff);
str += fromCharCode(unit0, unit);
}
else {
str += fromCharCode(unit);
}
}
else {
str += fromCharCode(octet1);
}
}
return str;
};
//# sourceMappingURL=v10.js.map
{"version":3,"file":"v10.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v10.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AAEzC,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACxE,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5B,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,OAAO,MAAM,GAAG,GAAG,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;YAC5B,SAAS;QACX,CAAC;QACD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC7B,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;YACrD,SAAS;QACX,CAAC;QACD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC7B,GAAG,IAAI,YAAY,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;YACtE,SAAS;QACX,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;YACrC,IAAI,IAAI,GAAG,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,MAAM,CAAC;YACpF,IAAI,IAAI,GAAG,MAAM,EAAE,CAAC;gBAClB,IAAI,IAAI,OAAO,CAAC;gBAChB,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC;gBAC/C,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;gBAC/B,GAAG,IAAI,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACnC,CAAC;iBAAM,CAAC;gBACN,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utf8Slice = Buffer.prototype.utf8Slice;
exports.default = (buf, start, length) => utf8Slice.call(buf, start, start + length);
//# sourceMappingURL=v11.js.map
{"version":3,"file":"v11.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v11.ts"],"names":[],"mappings":";;AAAA,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;AAC7C,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC"}
declare const _default: (arr: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const from = Buffer.from;
exports.default = (arr, start, length) => from(arr)
.subarray(start, start + length)
.toString();
//# sourceMappingURL=v12.js.map
{"version":3,"file":"v12.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v12.ts"],"names":[],"mappings":";;AAAA,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;AACzB,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE,CACxE,IAAI,CAAC,GAAG,CAAC;KACN,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;KAC/B,QAAQ,EAAE,CAAC"}
declare let decode: (buf: Uint8Array, start: number, length: number) => string;
export default decode;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const v10_1 = tslib_1.__importDefault(require("./v10"));
let decode = v10_1.default;
const hasBuffer = typeof Buffer !== 'undefined';
const utf8Slice = hasBuffer ? Buffer.prototype.utf8Slice : null;
if (utf8Slice) {
decode = (buf, start, length) => length <= 10 ? (0, v10_1.default)(buf, start, length) : utf8Slice.call(buf, start, start + length);
}
else {
const from = hasBuffer ? Buffer.from : null;
if (from) {
decode = (buf, start, length) => length < 30
? (0, v10_1.default)(buf, start, length)
: from(buf)
.subarray(start, start + length)
.toString();
}
else if (typeof TextDecoder !== 'undefined') {
const decoder = new TextDecoder();
decode = (buf, start, length) => length < 150 ? (0, v10_1.default)(buf, start, length) : decoder.decode(buf.subarray(start, start + length));
}
}
exports.default = decode;
//# sourceMappingURL=v13.js.map
{"version":3,"file":"v13.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v13.ts"],"names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AC,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC;IACjG,CAAC;AACH,CAAC;AAED,kBAAe,MAAM,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const v10_1 = tslib_1.__importDefault(require("./v10"));
const hasBuffer = typeof Buffer !== 'undefined';
const utf8Slice = hasBuffer ? Buffer.prototype.utf8Slice : null;
exports.default = utf8Slice
? (buf, start, length) => utf8Slice.call(buf, start, start + length)
: v10_1.default;
//# sourceMappingURL=v14.js.map
{"version":3,"file":"v14.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v14.ts"],"names":[],"mappings":";;;AAAA,wDAAwB;AAExB,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AAChD,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAEhE,kBAAe,SAAS;IACtB,CAAC,CAAC,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;IACxG,CAAC,CAAC,aAAG,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const v10_1 = tslib_1.__importDefault(require("./v10"));
const hasBuffer = typeof Buffer !== 'undefined';
const utf8Slice = hasBuffer ? Buffer.prototype.utf8Slice : null;
const from = hasBuffer ? Buffer.from : null;
exports.default = (buf, start, length) => {
const end = start + length;
return length > 8
? utf8Slice
? utf8Slice.call(buf, start, end)
: from
? from(buf).subarray(start, end).toString('utf8')
: (0, v10_1.default)(buf, start, length)
: (0, v10_1.default)(buf, start, length);
};
//# sourceMappingURL=v15.js.map
{"version":3,"file":"v15.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v15.ts"],"names":[],"mappings":";;;AAAA,wDAAwB;AAExB,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AAChD,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAChE,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAE5C,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACxE,MAAM,GAAG,GAAG,KAAK,GAAG,MAAM,CAAC;IAC3B,OAAO,MAAM,GAAG,CAAC;QACf,CAAC,CAAC,SAAS;YACT,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC;YACjC,CAAC,CAAC,IAAI;gBACJ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACjD,CAAC,CAAC,IAAA,aAAG,EAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC;QAC7B,CAAC,CAAC,IAAA,aAAG,EAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAC9B,CAAC,CAAC"}
type Decoder = (buf: Uint8Array, start: number, length: number) => string;
declare const decoder: Decoder;
export default decoder;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const decodeAscii_1 = require("../decodeAscii");
const v18_1 = tslib_1.__importDefault(require("./v18"));
const hasBuffer = typeof Buffer !== 'undefined';
const utf8Slice = hasBuffer ? Buffer.prototype.utf8Slice : null;
const from = hasBuffer ? Buffer.from : null;
const shortDecoder = (buf, start, length) => (0, decodeAscii_1.decodeAsciiMax15)(buf, start, length) ?? (0, v18_1.default)(buf, start, length);
const midDecoder = (buf, start, length) => (0, decodeAscii_1.decodeAscii)(buf, start, length) ?? (0, v18_1.default)(buf, start, length);
const longDecoder = utf8Slice
? (buf, start, length) => utf8Slice.call(buf, start, start + length)
: from
? (buf, start, length) => from(buf)
.subarray(start, start + length)
.toString('utf8')
: v18_1.default;
const decoder = (buf, start, length) => {
if (length < 16)
return shortDecoder(buf, start, length);
if (length < 32)
return midDecoder(buf, start, length);
return longDecoder(buf, start, length);
};
exports.default = decoder;
//# sourceMappingURL=v16.js.map
{"version":3,"file":"v16.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v16.ts"],"names":[],"mappings":";;;AAAA,gDAA6D;AAC7D,wDAAwB;AAIxB,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC;AAChD,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAChE,MAAM,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAE5C,MAAM,YAAY,GAAY,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,IAAA,8BAAgB,EAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,IAAA,aAAG,EAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAEtH,MAAM,UAAU,GAAY,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,IAAA,yBAAW,EAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,IAAA,aAAG,EAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAE/G,MAAM,WAAW,GAAY,SAAS;IACpC,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;IACpE,CAAC,CAAC,IAAI;QACJ,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CACrB,IAAI,CAAC,GAAG,CAAC;aACN,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;aAC/B,QAAQ,CAAC,MAAM,CAAC;QACvB,CAAC,CAAC,aAAG,CAAC;AAEV,MAAM,OAAO,GAAY,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAU,EAAE;IACtD,IAAI,MAAM,GAAG,EAAE;QAAE,OAAO,YAAY,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACzD,IAAI,MAAM,GAAG,EAAE;QAAE,OAAO,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACvD,OAAO,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,kBAAe,OAAO,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fromCharCode = String.fromCharCode;
exports.default = (buf, start, length) => {
let offset = start;
const end = offset + length;
let str = '';
while (offset < end) {
let code = buf[offset++];
if ((code & 0x80) !== 0) {
const octet2 = buf[offset++] & 0x3f;
if ((code & 0xe0) === 0xc0) {
code = ((code & 0x1f) << 6) | octet2;
}
else {
const octet3 = buf[offset++] & 0x3f;
if ((code & 0xf0) === 0xe0) {
code = ((code & 0x1f) << 12) | (octet2 << 6) | octet3;
}
else {
if ((code & 0xf8) === 0xf0) {
const octet4 = buf[offset++] & 0x3f;
let unit = ((code & 0x07) << 0x12) | (octet2 << 0x0c) | (octet3 << 0x06) | octet4;
if (unit > 0xffff) {
unit -= 0x10000;
const unit0 = ((unit >>> 10) & 0x3ff) | 0xd800;
unit = 0xdc00 | (unit & 0x3ff);
str += fromCharCode(unit0);
code = unit;
}
else {
code = unit;
}
}
}
}
}
str += fromCharCode(code);
}
return str;
};
//# sourceMappingURL=v17.js.map
{"version":3,"file":"v17.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v17.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AAEzC,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACxE,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5B,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,OAAO,MAAM,GAAG,GAAG,EAAE,CAAC;QACpB,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;YACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;gBAC3B,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;gBACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;oBAC3B,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC;gBACxD,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;wBAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;wBACrC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,MAAM,CAAC;wBAClF,IAAI,IAAI,GAAG,MAAM,EAAE,CAAC;4BAClB,IAAI,IAAI,OAAO,CAAC;4BAChB,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC;4BAC/C,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;4BAC/B,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;4BAC3B,IAAI,GAAG,IAAI,CAAC;wBACd,CAAC;6BAAM,CAAC;4BACN,IAAI,GAAG,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QACD,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fromCharCode = String.fromCharCode;
exports.default = (buf, start, length) => {
let offset = start;
const end = offset + length;
const points = [];
while (offset < end) {
let code = buf[offset++];
if ((code & 0x80) !== 0) {
const octet2 = buf[offset++] & 0x3f;
if ((code & 0xe0) === 0xc0) {
code = ((code & 0x1f) << 6) | octet2;
}
else {
const octet3 = buf[offset++] & 0x3f;
if ((code & 0xf0) === 0xe0) {
code = ((code & 0x1f) << 12) | (octet2 << 6) | octet3;
}
else {
if ((code & 0xf8) === 0xf0) {
const octet4 = buf[offset++] & 0x3f;
let unit = ((code & 0x07) << 0x12) | (octet2 << 0x0c) | (octet3 << 0x06) | octet4;
if (unit > 0xffff) {
unit -= 0x10000;
const unit0 = ((unit >>> 10) & 0x3ff) | 0xd800;
code = 0xdc00 | (unit & 0x3ff);
points.push(unit0);
}
else {
code = unit;
}
}
}
}
}
points.push(code);
}
return fromCharCode.apply(String, points);
};
//# sourceMappingURL=v18.js.map
{"version":3,"file":"v18.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v18.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;AAEzC,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACxE,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,OAAO,MAAM,GAAG,GAAG,EAAE,CAAC;QACpB,IAAI,IAAI,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;YACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;gBAC3B,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC;YACvC,CAAC;iBAAM,CAAC;gBACN,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;gBACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;oBAC3B,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC;gBACxD,CAAC;qBAAM,CAAC;oBACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;wBAC3B,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;wBACrC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,MAAM,CAAC;wBAClF,IAAI,IAAI,GAAG,MAAM,EAAE,CAAC;4BAClB,IAAI,IAAI,OAAO,CAAC;4BAChB,MAAM,KAAK,GAAG,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC;4BAC/C,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;4BAC/B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;wBACrB,CAAC;6BAAM,CAAC;4BACN,IAAI,GAAG,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,YAAY,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC,CAAC"}
declare const readUtf8: any;
export default readUtf8;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const { readUtf8 } = require('json-pack-napi');
exports.default = readUtf8;
//# sourceMappingURL=v19.js.map
{"version":3,"file":"v19.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v19.ts"],"names":[],"mappings":";;AAAA,MAAM,EAAC,QAAQ,EAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE7C,kBAAe,QAAQ,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (buf, start, length) => Buffer.prototype.utf8Slice.call(buf, start, start + length);
//# sourceMappingURL=v2.js.map
{"version":3,"file":"v2.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v2.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE,CACxE,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC"}
declare const _default: (arr: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (arr, start, length) => Buffer.from(arr)
.slice(start, start + length)
.toString();
//# sourceMappingURL=v3.js.map
{"version":3,"file":"v3.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v3.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE,CACxE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;KACb,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;KAC5B,QAAQ,EAAE,CAAC"}
declare const _default: (arr: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (arr, start, length) => Buffer.from(arr)
.subarray(start, start + length)
.toString();
//# sourceMappingURL=v4.js.map
{"version":3,"file":"v4.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v4.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE,CACxE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;KACb,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;KAC/B,QAAQ,EAAE,CAAC"}
declare const _default: (uint8: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (uint8, start, length) => {
const end = start + length;
let x = start;
let str = '';
while (x < end) {
const b1 = uint8[x++];
if ((b1 & 0x80) === 0) {
str += String.fromCharCode(b1);
continue;
}
else if ((b1 & 0xe0) === 0xc0) {
str += String.fromCharCode(((b1 & 0x1f) << 6) | (uint8[x++] & 0x3f));
}
else if ((b1 & 0xf0) === 0xe0) {
str += String.fromCharCode(((b1 & 0x1f) << 12) | ((uint8[x++] & 0x3f) << 6) | (uint8[x++] & 0x3f));
}
else if ((b1 & 0xf8) === 0xf0) {
const b2 = uint8[x++] & 0x3f;
const b3 = uint8[x++] & 0x3f;
const b4 = uint8[x++] & 0x3f;
let code = ((b1 & 0x07) << 0x12) | (b2 << 0x0c) | (b3 << 0x06) | b4;
if (code > 0xffff) {
code -= 0x10000;
str += String.fromCharCode(((code >>> 10) & 0x3ff) | 0xd800);
code = 0xdc00 | (code & 0x3ff);
}
str += String.fromCharCode(code);
}
else {
str += String.fromCharCode(b1);
}
}
return str;
};
//# sourceMappingURL=v5.js.map
{"version":3,"file":"v5.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v5.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,KAAiB,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IAC1E,MAAM,GAAG,GAAG,KAAK,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,GAAG,KAAK,CAAC;IACd,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;QACf,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,EAAE,CAAE,CAAC;QACvB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACtB,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;YAC/B,SAAS;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CAAC;gBAC7D,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;YACjC,CAAC;YACD,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,GAAG,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
declare const _default: (uint8: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sharedTextDecoder = new TextDecoder();
exports.default = (uint8, start, length) => {
const stringBytes = uint8.subarray(start, start + length);
return sharedTextDecoder.decode(stringBytes);
};
//# sourceMappingURL=v6.js.map
{"version":3,"file":"v6.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v6.ts"],"names":[],"mappings":";;AAAA,MAAM,iBAAiB,GAAG,IAAI,WAAW,EAAE,CAAC;AAE5C,kBAAe,CAAC,KAAiB,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IAC1E,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,CAAC;IAC1D,OAAO,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (buf, start, length) => {
let offset = start;
const end = offset + length;
const codes = [];
while (offset < end) {
const octet1 = buf[offset++];
if ((octet1 & 0x80) === 0) {
codes.push(octet1);
}
else if ((octet1 & 0xe0) === 0xc0) {
const octet2 = buf[offset++] & 0x3f;
codes.push(((octet1 & 0x1f) << 6) | octet2);
}
else if ((octet1 & 0xf0) === 0xe0) {
const octet2 = buf[offset++] & 0x3f;
const octet3 = buf[offset++] & 0x3f;
codes.push(((octet1 & 0x1f) << 12) | (octet2 << 6) | octet3);
}
else if ((octet1 & 0xf8) === 0xf0) {
const octet2 = buf[offset++] & 0x3f;
const octet3 = buf[offset++] & 0x3f;
const octet4 = buf[offset++] & 0x3f;
let unit = ((octet1 & 0x07) << 0x12) | (octet2 << 0x0c) | (octet3 << 0x06) | octet4;
if (unit > 0xffff) {
unit -= 0x10000;
codes.push(((unit >>> 10) & 0x3ff) | 0xd800);
unit = 0xdc00 | (unit & 0x3ff);
}
codes.push(unit);
}
else {
codes.push(octet1);
}
}
return String.fromCharCode(...codes);
};
//# sourceMappingURL=v7.js.map
{"version":3,"file":"v7.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v7.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACxE,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,OAAO,MAAM,GAAG,GAAG,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC;aAAM,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YACpC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;YACrC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;QAC9C,CAAC;aAAM,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YACpC,MAAM,MAAM,GAAG,GAAG,CA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number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (buf, start, length) => {
let offset = start;
const end = offset + length;
const units = [];
let result = '';
while (offset < end) {
const byte1 = buf[offset++];
if ((byte1 & 0x80) === 0) {
units.push(byte1);
}
else if ((byte1 & 0xe0) === 0xc0) {
const byte2 = buf[offset++] & 0x3f;
units.push(((byte1 & 0x1f) << 6) | byte2);
}
else if ((byte1 & 0xf0) === 0xe0) {
const byte2 = buf[offset++] & 0x3f;
const byte3 = buf[offset++] & 0x3f;
units.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);
}
else if ((byte1 & 0xf8) === 0xf0) {
const byte2 = buf[offset++] & 0x3f;
const byte3 = buf[offset++] & 0x3f;
const byte4 = buf[offset++] & 0x3f;
let unit = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;
if (unit > 0xffff) {
unit -= 0x10000;
units.push(((unit >>> 10) & 0x3ff) | 0xd800);
unit = 0xdc00 | (unit & 0x3ff);
}
units.push(unit);
}
else {
units.push(byte1);
}
if (units.length >= 8) {
result += String.fromCharCode(...units);
units.length = 0;
}
}
if (units.length > 0)
result += String.fromCharCode(...units);
return result;
};
//# sourceMappingURL=v8.js.map
{"version":3,"file":"v8.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v8.ts"],"names":[],"mappings":";;AACA,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACxE,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,OAAO,MAAM,GAAG,GAAG,EAAE,CAAC;QACpB,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,C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AChB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC;gBAC7C,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;YACjC,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC;YACxC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
declare const _default: (buf: Uint8Array, start: number, length: number) => string;
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (buf, start, length) => {
let offset = start;
const end = offset + length;
const codes = [];
while (offset < end) {
const octet1 = buf[offset++];
if ((octet1 & 0x80) === 0) {
codes.push(octet1);
continue;
}
const octet2 = buf[offset++] & 0x3f;
if ((octet1 & 0xe0) === 0xc0) {
codes.push(((octet1 & 0x1f) << 6) | octet2);
continue;
}
const octet3 = buf[offset++] & 0x3f;
if ((octet1 & 0xf0) === 0xe0) {
codes.push(((octet1 & 0x1f) << 12) | (octet2 << 6) | octet3);
continue;
}
if ((octet1 & 0xf8) === 0xf0) {
const octet4 = buf[offset++] & 0x3f;
let unit = ((octet1 & 0x07) << 0x12) | (octet2 << 0x0c) | (octet3 << 0x06) | octet4;
if (unit > 0xffff) {
unit -= 0x10000;
codes.push(((unit >>> 10) & 0x3ff) | 0xd800);
unit = 0xdc00 | (unit & 0x3ff);
}
codes.push(unit);
}
else {
codes.push(octet1);
}
}
return String.fromCharCode(...codes);
};
//# sourceMappingURL=v9.js.map
{"version":3,"file":"v9.js","sourceRoot":"","sources":["../../../../src/buffers/utf8/decodeUtf8/v9.ts"],"names":[],"mappings":";;AAAA,kBAAe,CAAC,GAAe,EAAE,KAAa,EAAE,MAAc,EAAU,EAAE;IACxE,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,OAAO,MAAM,GAAG,GAAG,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACnB,SAAS;QACX,CAAC;QACD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;YAC5C,SAAS;QACX,CAAC;QACD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAE,GAAG,IAAI,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;YAC7D,SAAS;QACX,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KA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