import type { Encoding } from 's2-tilejson';
export * from './compression';
/** The formats available to DecompressionStream */
export type Format = 'deflate' | 'deflate-raw' | 'gzip' | 'br' | 'zstd';
/**
 * Enum representing a compression algorithm used.
 * 0 = unknown compression, for if you must use a different or unspecified algorithm.
 * 1 = no compression.
 * 2 = gzip
 * 3 = brotli
 * 4 = zstd
 */
export declare const Compression: {
    /** Unknown compression, for if you must use a different or unspecified algorithm. */
    readonly Unknown: 0;
    /** No compression. */
    readonly None: 1;
    /** Gzip compression. */
    readonly Gzip: 2;
    /** Brotli compression. */
    readonly Brotli: 3;
    /** Zstd compression. */
    readonly Zstd: 4;
};
/**
 * Enum representing a compression algorithm used.
 * 0 = unknown compression, for if you must use a different or unspecified algorithm.
 * 1 = no compression.
 * 2 = gzip
 * 3 = brotli
 * 4 = zstd
 */
export type Compression = (typeof Compression)[keyof typeof Compression];
/**
 * Converts a string encoding to a compression algorithm enum
 * @param encoding - the encoding as a string
 * @returns the compression algorithm as an Enum
 */
export declare function encodingToCompression(encoding: Encoding): Compression;
/**
 * Converts a compression algorithm enum to a string encoding
 * @param compression - the compression algorithm as an Enum
 * @returns the encoding as a string
 */
export declare function compressionToFormat(compression: Compression): Format | 'none';
/**
 * Provide a decompression implementation that acts on `buf` and returns decompressed data.
 *
 * Should use the native DecompressionStream on browsers, zlib on node.
 * Should throw if the compression algorithm is not supported.
 */
export type DecompressFunc = (buf: Uint8Array, compression: Compression) => Promise<Uint8Array>;
/**
 * pollyfill for string to array buffer
 * @param base64 - base64 encoded string
 * @returns converted ArrayBuffer of the string data
 */
export declare function base64ToArrayBuffer(base64: string): ArrayBufferLike;
/**
 * @param uint8arrays - the Uint8Arrays to concatenate
 * @returns - the concatenated Uint8Array
 */
export declare function concatUint8Arrays(uint8arrays: Uint8Array[]): Promise<Uint8Array>;
//# sourceMappingURL=index.d.ts.map