optimizations

This commit is contained in:
proddy
2025-10-28 22:19:08 +01:00
parent 55b893362c
commit 3abfb7bb9c
93 changed files with 3953 additions and 3361 deletions

View File

@@ -54,7 +54,7 @@ export class Unpackr {
}
Object.assign(this, options);
}
unpack(source, options?: any) {
unpack(source, options?: { start?: number; end?: number; lazy?: boolean }) {
if (src) {
return saveState(() => {
clearSource();
@@ -184,7 +184,7 @@ export class Unpackr {
function getPosition() {
return position;
}
function checkedRead(options: any) {
function checkedRead(options?: { lazy?: boolean }) {
try {
if (!currentUnpackr.trusted && !sequentialMode) {
const sharedLength = currentStructures.sharedLength || 0;