@mappedin/mvf-fetch 3.0.0-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Thrown when a fetched MVF file fails validation.
3
+ */
4
+ export class ValidationError extends Error {
5
+ path;
6
+ cause;
7
+ constructor(path, cause) {
8
+ super(`Validation failed for ${path}`);
9
+ this.path = path;
10
+ this.cause = cause;
11
+ this.name = 'ValidationError';
12
+ }
13
+ }
14
+ /**
15
+ * Invokes a validator and wraps failures in {@link ValidationError}.
16
+ */
17
+ export async function validateFetchedFile(validator, file) {
18
+ if (validator == null) {
19
+ return;
20
+ }
21
+ try {
22
+ await validator(file);
23
+ }
24
+ catch (error) {
25
+ if (error instanceof ValidationError) {
26
+ throw error;
27
+ }
28
+ throw new ValidationError(file.path, error);
29
+ }
30
+ }
31
+ /**
32
+ * Validates multiple fetched files sequentially.
33
+ */
34
+ export async function validateFetchedFiles(validator, version, files) {
35
+ for (const [path, contents] of Object.entries(files)) {
36
+ await validateFetchedFile(validator, { path, version, contents });
37
+ }
38
+ }
39
+ //# sourceMappingURL=validate.js.map
@@ -0,0 +1,9 @@
1
+ import type { FileValidator } from '../validate.js';
2
+ /**
3
+ * Creates a validator that delegates to the v2 or v3 adapter based on file version.
4
+ */
5
+ export declare function autoMvfValidator(): FileValidator;
6
+ export { assembleV2ParsedMvfFromFiles, createV2FileValidator, validateAssembledV2Files, validateAssembledV2ParsedMvf, } from './v2.js';
7
+ export { createV3FileValidator } from './v3.js';
8
+ export { V3_EXTENSIONS } from './v3-extensions.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { createV2FileValidator } from './v2.js';
2
+ import { createV3FileValidator } from './v3.js';
3
+ /**
4
+ * Creates a validator that delegates to the v2 or v3 adapter based on file version.
5
+ */
6
+ export function autoMvfValidator() {
7
+ const validateV2 = createV2FileValidator();
8
+ const validateV3 = createV3FileValidator();
9
+ return async (file) => {
10
+ if (file.version === '2.0.0') {
11
+ await validateV2(file);
12
+ return;
13
+ }
14
+ await validateV3(file);
15
+ };
16
+ }
17
+ export { assembleV2ParsedMvfFromFiles, createV2FileValidator, validateAssembledV2Files, validateAssembledV2ParsedMvf, } from './v2.js';
18
+ export { createV3FileValidator } from './v3.js';
19
+ export { V3_EXTENSIONS } from './v3-extensions.js';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,19 @@
1
+ import type { ParsedMVF } from '@mappedin/mvf-v2/no-validator';
2
+ import type { FileValidator } from '../validate.js';
3
+ /**
4
+ * Best-effort per-file validation for MVF v2 zip entries.
5
+ */
6
+ export declare function createV2FileValidator(): FileValidator;
7
+ /**
8
+ * Assembles a v2 {@link ParsedMVF} object from path-keyed decoded zip entries.
9
+ */
10
+ export declare function assembleV2ParsedMvfFromFiles(files: Record<string, unknown>): ParsedMVF;
11
+ /**
12
+ * Validates a fully assembled MVF v2 bundle.
13
+ */
14
+ export declare function validateAssembledV2ParsedMvf(parsed: ParsedMVF): void;
15
+ /**
16
+ * Validates path-keyed decoded v2 entries as a complete MVF bundle.
17
+ */
18
+ export declare function validateAssembledV2Files(files: Record<string, unknown>): void;
19
+ //# sourceMappingURL=v2.d.ts.map
@@ -0,0 +1,69 @@
1
+ import { getMvfValidationErrors, validateMvf } from '@mappedin/mvf-v2';
2
+ const FILE_EXTENSION = /\.json|\.geojson$/;
3
+ function isRecord(value) {
4
+ return value != null && typeof value === 'object' && !Array.isArray(value);
5
+ }
6
+ function assertGeoJsonFeatureCollection(path, contents) {
7
+ if (!isRecord(contents) || contents.type !== 'FeatureCollection') {
8
+ throw new Error(`${path} must be a GeoJSON FeatureCollection`);
9
+ }
10
+ }
11
+ /**
12
+ * Best-effort per-file validation for MVF v2 zip entries.
13
+ */
14
+ export function createV2FileValidator() {
15
+ return (file) => {
16
+ if (file.version !== '2.0.0') {
17
+ return;
18
+ }
19
+ if (!isRecord(file.contents)) {
20
+ throw new Error(`${file.path} must decode to a JSON object`);
21
+ }
22
+ if (file.path.endsWith('.geojson')) {
23
+ assertGeoJsonFeatureCollection(file.path, file.contents);
24
+ }
25
+ if (file.path.endsWith('.json') && file.path !== 'connection.json') {
26
+ if (Array.isArray(file.contents)) {
27
+ return;
28
+ }
29
+ if (!isRecord(file.contents)) {
30
+ throw new Error(`${file.path} must decode to a JSON object or array`);
31
+ }
32
+ }
33
+ };
34
+ }
35
+ /**
36
+ * Assembles a v2 {@link ParsedMVF} object from path-keyed decoded zip entries.
37
+ */
38
+ export function assembleV2ParsedMvfFromFiles(files) {
39
+ const parsed = {};
40
+ for (const [path, contents] of Object.entries(files)) {
41
+ if (path.includes('/')) {
42
+ const [folder, fileName] = path.split('/');
43
+ if (folder == null || fileName == null) {
44
+ continue;
45
+ }
46
+ const floorId = fileName.replace(FILE_EXTENSION, '');
47
+ const folderRecord = (parsed[folder] ??= {});
48
+ folderRecord[floorId] = contents;
49
+ continue;
50
+ }
51
+ parsed[path] = contents;
52
+ }
53
+ return parsed;
54
+ }
55
+ /**
56
+ * Validates a fully assembled MVF v2 bundle.
57
+ */
58
+ export function validateAssembledV2ParsedMvf(parsed) {
59
+ if (!validateMvf(parsed)) {
60
+ throw new Error(getMvfValidationErrors(parsed).join('\n') || 'Invalid MVF v2 bundle');
61
+ }
62
+ }
63
+ /**
64
+ * Validates path-keyed decoded v2 entries as a complete MVF bundle.
65
+ */
66
+ export function validateAssembledV2Files(files) {
67
+ validateAssembledV2ParsedMvf(assembleV2ParsedMvfFromFiles(files));
68
+ }
69
+ //# sourceMappingURL=v2.js.map
@@ -0,0 +1,10 @@
1
+ import type { IntegrityError } from '@mappedin/mvf-core/errors';
2
+ import type { MVFExtension } from '@mappedin/mvf-core/extension';
3
+ import type { TSchema } from '@sinclair/typebox';
4
+ type UnknownV3Extension = MVFExtension<TSchema, TSchema[], IntegrityError | unknown>;
5
+ /**
6
+ * Standard MVF v3 extensions used to validate fetched zip entries.
7
+ */
8
+ export declare const V3_EXTENSIONS: UnknownV3Extension[];
9
+ export {};
10
+ //# sourceMappingURL=v3-extensions.d.ts.map
@@ -0,0 +1,42 @@
1
+ import { AnnotationsExtension } from '@mappedin/mvf-annotations';
2
+ import { CMSExtension } from '@mappedin/mvf-cms';
3
+ import { ConnectionsExtension } from '@mappedin/mvf-connections';
4
+ import { FloorsExtension } from '@mappedin/mvf-core/floors';
5
+ import { GeometryExtension } from '@mappedin/mvf-core/geometry';
6
+ import { ManifestExtension } from '@mappedin/mvf-core/manifest';
7
+ import { DefaultStyleExtension } from '@mappedin/mvf-default-style';
8
+ import { EntranceAestheticExtension } from '@mappedin/mvf-entrance-aesthetic';
9
+ import { FacadeExtension } from '@mappedin/mvf-facade';
10
+ import { FloorImagesExtension } from '@mappedin/mvf-floor-images';
11
+ import { FloorStackExtension } from '@mappedin/mvf-floor-stacks';
12
+ import { KindsExtension } from '@mappedin/mvf-kinds';
13
+ import { LocationsExtension } from '@mappedin/mvf-locations';
14
+ import { NavigationFlagsExtension } from '@mappedin/mvf-navigation-flags';
15
+ import { NodesExtension } from '@mappedin/mvf-nodes';
16
+ import { OutdoorsExtension } from '@mappedin/mvf-outdoors';
17
+ import { TilesetExtension } from '@mappedin/mvf-tileset';
18
+ import { TraversabilityExtension } from '@mappedin/mvf-traversability';
19
+ /**
20
+ * Standard MVF v3 extensions used to validate fetched zip entries.
21
+ */
22
+ export const V3_EXTENSIONS = [
23
+ ManifestExtension,
24
+ FloorsExtension,
25
+ GeometryExtension,
26
+ NavigationFlagsExtension,
27
+ NodesExtension,
28
+ ConnectionsExtension,
29
+ KindsExtension,
30
+ TraversabilityExtension,
31
+ DefaultStyleExtension,
32
+ FloorStackExtension,
33
+ OutdoorsExtension,
34
+ TilesetExtension,
35
+ FloorImagesExtension,
36
+ FacadeExtension,
37
+ AnnotationsExtension,
38
+ LocationsExtension,
39
+ CMSExtension,
40
+ EntranceAestheticExtension,
41
+ ];
42
+ //# sourceMappingURL=v3-extensions.js.map
@@ -0,0 +1,11 @@
1
+ import type { IntegrityError } from '@mappedin/mvf-core/errors';
2
+ import type { MVFExtension } from '@mappedin/mvf-core/extension';
3
+ import type { TSchema } from '@sinclair/typebox';
4
+ import type { FileValidator } from '../validate.js';
5
+ type UnknownV3Extension = MVFExtension<TSchema, TSchema[], IntegrityError | unknown>;
6
+ /**
7
+ * Creates a per-file validator for MVF v3 zip entries using extension schemas.
8
+ */
9
+ export declare function createV3FileValidator(extensions?: readonly UnknownV3Extension[]): FileValidator;
10
+ export {};
11
+ //# sourceMappingURL=v3.d.ts.map
@@ -0,0 +1,47 @@
1
+ import { ValidationContext } from '@mappedin/mvf-core/test-utils';
2
+ import { V3_EXTENSIONS } from './v3-extensions.js';
3
+ const jsonDecode = (bytes) => JSON.parse(new TextDecoder().decode(bytes));
4
+ const encodeJson = (value) => new TextEncoder().encode(JSON.stringify(value));
5
+ const PROBE_BYTES = new Uint8Array([123, 125]);
6
+ function findExtensionForPath(path, extensions) {
7
+ for (const extension of extensions) {
8
+ try {
9
+ const partial = extension.fromBundle(path, PROBE_BYTES, jsonDecode);
10
+ if (partial !== undefined) {
11
+ return extension;
12
+ }
13
+ }
14
+ catch {
15
+ return extension;
16
+ }
17
+ }
18
+ return undefined;
19
+ }
20
+ const validationContexts = new Map(V3_EXTENSIONS.map((extension) => [extension.name, ValidationContext.fromExtension(extension)]));
21
+ /**
22
+ * Creates a per-file validator for MVF v3 zip entries using extension schemas.
23
+ */
24
+ export function createV3FileValidator(extensions = V3_EXTENSIONS) {
25
+ return (file) => {
26
+ if (file.version !== '3.0.0') {
27
+ return;
28
+ }
29
+ const extension = findExtensionForPath(file.path, extensions);
30
+ if (extension == null) {
31
+ throw new Error(`No MVF v3 extension registered for path: ${file.path}`);
32
+ }
33
+ const partial = extension.fromBundle(file.path, encodeJson(file.contents), jsonDecode);
34
+ if (partial == null) {
35
+ throw new Error(`Failed to decode MVF v3 partial for path: ${file.path}`);
36
+ }
37
+ const context = validationContexts.get(extension.name);
38
+ if (context == null) {
39
+ throw new Error(`Missing validation context for extension: ${extension.name}`);
40
+ }
41
+ const validator = context.createValidator(extension.schema);
42
+ if (!validator.Check(partial)) {
43
+ throw new Error(validator.ShortError(partial) ?? `Invalid MVF v3 file: ${file.path}`);
44
+ }
45
+ };
46
+ }
47
+ //# sourceMappingURL=v3.js.map
@@ -0,0 +1,53 @@
1
+ import type { MvfZipSource } from './source.js';
2
+ /**
3
+ * Supported published MVF manifest versions.
4
+ */
5
+ export type MvfVersion = '2.0.0' | '3.0.0';
6
+ export interface ManifestFeatureCollection {
7
+ type: 'FeatureCollection';
8
+ features: Array<{
9
+ properties: {
10
+ version?: string;
11
+ mapId?: string;
12
+ map?: string;
13
+ name?: string;
14
+ };
15
+ }>;
16
+ }
17
+ /**
18
+ * Reads and parses `manifest.geojson` from the zip source.
19
+ */
20
+ export declare function getManifest(source: MvfZipSource): Promise<ManifestFeatureCollection>;
21
+ /**
22
+ * Detects the MVF version from `manifest.geojson`.
23
+ */
24
+ export declare function detectVersion(source: MvfZipSource): Promise<MvfVersion>;
25
+ /**
26
+ * Returns the map identifier from the manifest, when present.
27
+ */
28
+ export declare function getMapIdFromManifest(manifest: ManifestFeatureCollection): string | undefined;
29
+ /**
30
+ * Returns global file paths for the given MVF version.
31
+ */
32
+ export declare function getGlobalPaths(version: MvfVersion): readonly string[];
33
+ /**
34
+ * Returns per-floor folder prefixes for the given MVF version.
35
+ */
36
+ export declare function getPerFloorFolders(version: MvfVersion): readonly string[];
37
+ /**
38
+ * Builds the per-floor entry paths that exist in the zip for a floor id.
39
+ */
40
+ export declare function getFloorEntryPaths(version: MvfVersion, floorId: string, availablePaths: Iterable<string>): string[];
41
+ /**
42
+ * Groups zip entry paths by MVF version-specific categories.
43
+ */
44
+ export declare function groupEntriesByVersion(version: MvfVersion, paths: Iterable<string>): {
45
+ globals: string[];
46
+ perFloor: Record<string, string[]>;
47
+ other: string[];
48
+ };
49
+ /**
50
+ * Extracts floor ids present in the zip index for the detected MVF version.
51
+ */
52
+ export declare function extractFloorIds(version: MvfVersion, paths: Iterable<string>): string[];
53
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1,154 @@
1
+ const V2_GLOBAL_FILES = [
2
+ 'manifest.geojson',
3
+ 'map.geojson',
4
+ 'floor.geojson',
5
+ 'mapstack.geojson',
6
+ 'mapstack.json',
7
+ 'floorstack.json',
8
+ 'node.geojson',
9
+ 'connection.json',
10
+ 'styles.json',
11
+ 'shapes.json',
12
+ 'tileset.json',
13
+ 'location.json',
14
+ 'category.json',
15
+ 'navigationFlags.json',
16
+ 'annotation-symbols.json',
17
+ ];
18
+ const V2_PER_FLOOR_FOLDERS = [
19
+ 'space',
20
+ 'obstruction',
21
+ 'entrance',
22
+ 'annotation',
23
+ 'textAreas',
24
+ 'shapeInstances',
25
+ 'modelInstances',
26
+ 'window',
27
+ 'area',
28
+ 'floorImages',
29
+ ];
30
+ const V3_GLOBAL_FILES = [
31
+ 'manifest.geojson',
32
+ 'floors.geojson',
33
+ 'floor-stacks.json',
34
+ 'outdoors.json',
35
+ 'connections.json',
36
+ 'default-style.json',
37
+ 'tileset.json',
38
+ 'navigationFlags.json',
39
+ 'annotation-symbols.json',
40
+ 'locations.json',
41
+ 'location.json',
42
+ 'location-categories.json',
43
+ 'location-instances.json',
44
+ ];
45
+ const V3_PER_FLOOR_FOLDERS = [
46
+ 'geometry',
47
+ 'kinds',
48
+ 'walkable',
49
+ 'nonwalkable',
50
+ 'annotations',
51
+ 'entrance-aesthetic',
52
+ 'facade',
53
+ 'floorImages',
54
+ 'nodes',
55
+ ];
56
+ function parseManifestVersion(manifest) {
57
+ const version = manifest.features[0]?.properties.version;
58
+ if (version === '2.0.0' || version === '3.0.0') {
59
+ return version;
60
+ }
61
+ throw new Error(`Unsupported MVF manifest version: ${String(version)}`);
62
+ }
63
+ /**
64
+ * Reads and parses `manifest.geojson` from the zip source.
65
+ */
66
+ export async function getManifest(source) {
67
+ const manifest = await source.getEntry('manifest.geojson');
68
+ if (manifest == null) {
69
+ throw new Error('manifest.geojson is missing from the MVF zip.');
70
+ }
71
+ return manifest;
72
+ }
73
+ /**
74
+ * Detects the MVF version from `manifest.geojson`.
75
+ */
76
+ export async function detectVersion(source) {
77
+ const manifest = await getManifest(source);
78
+ return parseManifestVersion(manifest);
79
+ }
80
+ /**
81
+ * Returns the map identifier from the manifest, when present.
82
+ */
83
+ export function getMapIdFromManifest(manifest) {
84
+ const properties = manifest.features[0]?.properties;
85
+ return properties?.mapId ?? properties?.map;
86
+ }
87
+ /**
88
+ * Returns global file paths for the given MVF version.
89
+ */
90
+ export function getGlobalPaths(version) {
91
+ return version === '2.0.0' ? V2_GLOBAL_FILES : V3_GLOBAL_FILES;
92
+ }
93
+ /**
94
+ * Returns per-floor folder prefixes for the given MVF version.
95
+ */
96
+ export function getPerFloorFolders(version) {
97
+ return version === '2.0.0' ? V2_PER_FLOOR_FOLDERS : V3_PER_FLOOR_FOLDERS;
98
+ }
99
+ /**
100
+ * Builds the per-floor entry paths that exist in the zip for a floor id.
101
+ */
102
+ export function getFloorEntryPaths(version, floorId, availablePaths) {
103
+ const available = new Set(availablePaths);
104
+ const folders = getPerFloorFolders(version);
105
+ const paths = [];
106
+ for (const folder of folders) {
107
+ for (const extension of ['json', 'geojson']) {
108
+ const candidate = `${folder}/${floorId}.${extension}`;
109
+ if (available.has(candidate)) {
110
+ paths.push(candidate);
111
+ }
112
+ }
113
+ }
114
+ return paths;
115
+ }
116
+ /**
117
+ * Groups zip entry paths by MVF version-specific categories.
118
+ */
119
+ export function groupEntriesByVersion(version, paths) {
120
+ const allPaths = [...paths];
121
+ const globals = new Set();
122
+ const perFloor = {};
123
+ const other = [];
124
+ for (const path of allPaths) {
125
+ if (getGlobalPaths(version).includes(path)) {
126
+ globals.add(path);
127
+ continue;
128
+ }
129
+ const perFloorMatch = path.match(/^([^/]+)\/(.+)\.(json|geojson)$/);
130
+ if (perFloorMatch != null) {
131
+ const [, folder, floorId] = perFloorMatch;
132
+ if (folder != null && floorId != null && getPerFloorFolders(version).includes(folder)) {
133
+ const floorPaths = perFloor[floorId] ?? [];
134
+ floorPaths.push(path);
135
+ perFloor[floorId] = floorPaths;
136
+ continue;
137
+ }
138
+ }
139
+ other.push(path);
140
+ }
141
+ return {
142
+ globals: [...globals],
143
+ perFloor,
144
+ other,
145
+ };
146
+ }
147
+ /**
148
+ * Extracts floor ids present in the zip index for the detected MVF version.
149
+ */
150
+ export function extractFloorIds(version, paths) {
151
+ const grouped = groupEntriesByVersion(version, paths);
152
+ return Object.keys(grouped.perFloor).sort();
153
+ }
154
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Reads a little-endian unsigned 16-bit integer from a byte array.
3
+ */
4
+ export declare function readUint16LE(bytes: Uint8Array, offset: number): number;
5
+ /**
6
+ * Reads a little-endian unsigned 32-bit integer from a byte array.
7
+ */
8
+ export declare function readUint32LE(bytes: Uint8Array, offset: number): number;
9
+ /**
10
+ * Deduplicates paths while preserving order.
11
+ */
12
+ export declare function uniquePaths(paths: string[]): string[];
13
+ /**
14
+ * Splits an array into fixed-size chunks.
15
+ */
16
+ export declare function chunkArray<T>(items: T[], chunkSize: number): T[][];
17
+ //# sourceMappingURL=bytes.d.ts.map
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Reads a little-endian unsigned 16-bit integer from a byte array.
3
+ */
4
+ export function readUint16LE(bytes, offset) {
5
+ return (bytes[offset] ?? 0) | ((bytes[offset + 1] ?? 0) << 8);
6
+ }
7
+ /**
8
+ * Reads a little-endian unsigned 32-bit integer from a byte array.
9
+ */
10
+ export function readUint32LE(bytes, offset) {
11
+ return (((bytes[offset] ?? 0) |
12
+ ((bytes[offset + 1] ?? 0) << 8) |
13
+ ((bytes[offset + 2] ?? 0) << 16) |
14
+ ((bytes[offset + 3] ?? 0) << 24)) >>>
15
+ 0);
16
+ }
17
+ /**
18
+ * Deduplicates paths while preserving order.
19
+ */
20
+ export function uniquePaths(paths) {
21
+ return [...new Set(paths)];
22
+ }
23
+ /**
24
+ * Splits an array into fixed-size chunks.
25
+ */
26
+ export function chunkArray(items, chunkSize) {
27
+ if (chunkSize <= 0) {
28
+ throw new Error('chunkSize must be greater than 0');
29
+ }
30
+ const chunks = [];
31
+ for (let i = 0; i < items.length; i += chunkSize) {
32
+ chunks.push(items.slice(i, i + chunkSize));
33
+ }
34
+ return chunks;
35
+ }
36
+ //# sourceMappingURL=bytes.js.map
@@ -0,0 +1,52 @@
1
+ import { type ZipEntryMeta, type ZipIndex } from './index.js';
2
+ import { type FetchFn } from './range.js';
3
+ import { type ByteRange } from './ranges.js';
4
+ export declare const LOCAL_EXTRA_FIELD_PAD = 1024;
5
+ export interface ReadZipEntriesOptions {
6
+ allowMissing?: boolean;
7
+ concurrency?: number;
8
+ fetchFn?: FetchFn;
9
+ /**
10
+ * Merge entry ranges separated by at most this many unwanted bytes into one request.
11
+ * @default 0
12
+ */
13
+ maxGapBytes?: number;
14
+ }
15
+ interface ExtractCompressedResult {
16
+ compressed: Uint8Array;
17
+ remainingRange?: ByteRange;
18
+ }
19
+ /**
20
+ * Computes the initial byte range to fetch for a zip entry local header and payload.
21
+ */
22
+ export declare function computeEntryEstimatedRange(entryPath: string, meta: ZipEntryMeta, totalSize: number): ByteRange;
23
+ /**
24
+ * Extracts compressed entry bytes from a fetched buffer covering the entry header region.
25
+ */
26
+ export declare function extractCompressedBytes(buffer: Uint8Array, bufferAbsoluteStart: number, entryPath: string, meta: ZipEntryMeta): ExtractCompressedResult;
27
+ /**
28
+ * Reads the compressed bytes for a single zip entry via HTTP Range.
29
+ */
30
+ export declare function readZipEntryBytes(url: string, entryPath: string, index: ZipIndex, fetchFn?: FetchFn): Promise<Uint8Array>;
31
+ /**
32
+ * Decompresses a zip entry payload.
33
+ */
34
+ export declare function decompressEntry(compressed: Uint8Array, meta: ZipEntryMeta): Uint8Array;
35
+ /**
36
+ * Reads and decompresses multiple zip entries, coalescing adjacent HTTP Range requests.
37
+ */
38
+ export declare function readZipEntries(url: string, entryPaths: string[], index: ZipIndex, options?: ReadZipEntriesOptions): Promise<Map<string, Uint8Array>>;
39
+ /**
40
+ * Returns the coalesced HTTP Range count for a batch of entry paths.
41
+ * Useful for testing and diagnostics.
42
+ */
43
+ export declare function countCoalescedRangesForEntries(entryPaths: string[], index: ZipIndex, maxGapBytes?: number): {
44
+ rawRanges: number;
45
+ coalescedRanges: number;
46
+ };
47
+ /**
48
+ * Decodes zip entry bytes as UTF-8 JSON.
49
+ */
50
+ export declare function decodeZipEntryJson<T = unknown>(raw: Uint8Array): T;
51
+ export {};
52
+ //# sourceMappingURL=entry.d.ts.map