gis-tools-ts
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
37 lines • 1.39 kB
TypeScript
import type { Format } from '../index.js';
/**
* A Browser compatible Gzip compression function
* @param bytes - the data to decompress
* @param format - the format of the data. Defaults to 'gzip'
* @returns - the decompressed data
*/
export declare function compressStream(bytes: Uint8Array, format?: Format): Promise<Uint8Array>;
/**
* A Browser compatible Gzip decompression function
* @param bytes - the data to decompress
* @param format - the format of the data. Defaults to 'gzip'
* @returns - the decompressed data
*/
export declare function decompressStream(bytes: Uint8Array, format?: Format): Promise<Uint8Array>;
/**
* Each {@link ZipItem} can have its decompressed bytes read by calling its `read()` method,
* which'll give either `Uint8Array` _or_ `Promise<Uint8Array>` (as it's possible to be sync).
*/
export interface ZipItem {
filename: string;
comment: string;
read: () => Promise<Uint8Array> | Uint8Array;
}
/**
* Iterate over the items in a zip file. See {@link ZipItem}.
* @param raw - the raw data to read
* @yields {ZipItem}
*/
export declare function iterZipFolder(raw: Uint8Array): Generator<ZipItem, void, void>;
/**
* Decompress the LZW data
* @param buffer - The LZW data
* @returns - The decompressed data
*/
export declare function lzwDecoder(buffer: ArrayBufferLike): ArrayBufferLike;
//# sourceMappingURL=compression.d.ts.map