/** * WASM utility functions for browser usage. * * Provides isXZ, versionString, versionNumber, parseFileIndex * matching the Node.js API signatures. */ import type { XZFileIndex } from '../types.js'; import { checkIsSupported } from './bindings.js'; /** * Check if a buffer contains XZ compressed data. * * @param buffer - Data to check * @returns true if the buffer starts with the XZ magic bytes */ export declare function isXZ(buffer: Uint8Array | ArrayBuffer): boolean; /** * Get the liblzma version string (e.g. "5.6.3"). */ export declare function versionString(): string; /** * Get the liblzma version as a number (e.g. 50060030 for 5.6.3). */ export declare function versionNumber(): number; /** * Get memory usage estimate for the easy encoder with given preset. * * Note: In WASM, this is approximated based on preset level. * Presets 7-9 require significantly more memory at runtime than reported here * and may exceed the default WASM memory limit (256MB). */ export declare function easyEncoderMemusage(preset: number): number; /** * Get memory usage estimate for the easy decoder. */ export declare function easyDecoderMemusage(): number; export type { XZFileIndex } from '../types.js'; /** * Parse the index of an XZ file to extract metadata. * Parses the XZ footer and the index section to extract real * uncompressed size, block count, and integrity check type. * * @param buffer - Complete XZ file data * @returns File index information */ export declare function parseFileIndex(buffer: Uint8Array | ArrayBuffer): XZFileIndex; export { checkIsSupported }; /** Convert various input types to Uint8Array */ export declare function toUint8Array(input: Uint8Array | ArrayBuffer | string): Uint8Array; //# sourceMappingURL=utils.d.ts.map