import { type DeflateFunctionOptions, type InflateOptions, type DeflateOptions, } from 'pako' /** * CompressOpts is a type that extends DeflateOptions with additional 'coverage' property * @type {Object} CompressOpts * @property {1 | 2 | 3 | 4 | null} coverage - Specifies the level of compression coverage. */ type CompressOpts = DeflateOptions & { coverage: 1 | 2 | 3 | 4 | null } /** * Compresses the provided data using an optional dictionary and specified options. * * @param {Uint8Array} dictionary - The optional dictionary to use for compression. * @param {DeflateOptions} options - The options for the compression process. * @param {Uint8Array[]} data - The data to be compressed. * @returns {Uint8Array} - The compressed data. */ declare function compressData( dictionary: Uint8Array, options: DeflateOptions, ...data: Uint8Array[] ): Uint8Array /** * Compresses the provided data using specified options. * * @param {DeflateOptions} options - The options for the compression process. * @param {Uint8Array[]} data - The data to be compressed. * @returns {Uint8Array} - The compressed data. */ declare function compressData( options: DeflateOptions, ...data: Uint8Array[] ): Uint8Array /** * Compresses a single Uint8Array using an optional dictionary and specified options. * * @param {Uint8Array} dictionary - The optional dictionary to use for compression. * @param {DeflateOptions} options - The options for the compression process. * @param {Uint8Array} data - The data to be compressed. * @returns {Uint8Array} - The compressed data. */ declare function compressData( dictionary: Uint8Array, options: DeflateOptions, data: Uint8Array ): Uint8Array /** * Compresses a single Uint8Array using specified options. * * @param {DeflateOptions} options - The options for the compression process. * @param {Uint8Array} data - The data to be compressed. * @returns {Uint8Array} - The compressed data. */ declare function compressData( options: DeflateOptions, data: Uint8Array ): Uint8Array /** * Decompresses the provided data using the specified options. * * @param {Uint8Array} data - The compressed data to decompress. * @param {InflateOptions} [opts] - Optional settings for the decompression. * @returns {Uint8Array} - The decompressed data. */ declare function decompressData( data: Uint8Array, opts?: InflateOptions ): Uint8Array /** * Calculates the total size and chunk size based on the input data array and chunk count. * * @param {Uint8Array[]} dataArray - The array of data to calculate size from. * @param {number} chunkCount - The number of chunks to divide the total size into. * @returns {{ totalSize: number; chunkSize: number }} - The total size and chunk size. * @throws Will throw an error if chunkCount is less than or equal to zero. */ declare function calculateChunkSize( dataArray: Uint8Array[], chunkCount: number ): { totalSize: number chunkSize: number } export { compressData, decompressData, calculateChunkSize } export type { CompressOpts, DeflateFunctionOptions, InflateOptions, DeflateOptions, } //# sourceMappingURL=compression.d.ts.map