node-liblzma - v5.0.1
    Preparing search index...

    Interface LZMAOptions

    interface LZMAOptions {
        check?: number;
        chunkSize?: number;
        filters?: number[];
        flushFlag?: number;
        memlimit?: number | bigint;
        mode?: number;
        preset?: number;
        threads?: number;
    }
    Index

    Properties

    check?: number

    Integrity check type

    chunkSize?: number

    Chunk size for processing

    filters?: number[]

    Array of filters to use

    flushFlag?: number

    Flush flag to use

    memlimit?: number | bigint

    Memory usage limit for decompression, in bytes.

    Honored by all decoder APIs (unxz, unxzAsync, Unxz, createUnxz — both native and WASM paths). xzAsync is compression-only and does not read memlimit.

    Accepted types: number or bigint. Both are validated before reaching the decoder. The native binding accepts either type directly via N-API; the WASM Buffer API coerces to bigint for the C ABI. The number form must be a finite, non-negative integer; passing NaN, Infinity, a fractional value, or a negative number throws LZMAOptionsError before any decompression is attempted. For values ≥ Number.MAX_SAFE_INTEGER (2^53 - 1), use bigint to avoid precision loss on coercion; passing a number above this threshold also throws LZMAOptionsError. bigint values above UINT64_MAX (2^64 - 1) are also rejected with LZMAOptionsError.

    Default: UINT64_MAX (no limit) for native; BigInt(256 * 1024 * 1024) (256 MiB) for WASM buffer APIs (unxz/unxzAsync).

    When the compressed stream requires more memory than this limit, decompression throws/emits LZMAMemoryLimitError with code === LZMA_MEMLIMIT_ERROR (numeric constant 6, re-exported from src/errors.ts).

    mode?: number

    Compression mode

    preset?: number

    Compression preset level

    threads?: number

    Number of threads for compression (encoding only)