s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
31 lines • 1.18 kB
TypeScript
import type { Format } from '..';
/**
* 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
* @param raw - the raw data to read
* @yields - {@link ZipItem}
*/
export declare function iterItems(raw: Uint8Array): Generator<ZipItem, void, void>;
//# sourceMappingURL=gzip.d.ts.map