omni-compress - v2.3.1
    Preparing search index...

    Interface ArchiveOptions

    Options for archive() and archiveStream().

    interface ArchiveOptions {
        format?: "zip";
        level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
        smartOptimize?: boolean;
        onProgress?: (percent: number) => void;
        signal?: AbortSignal;
    }
    Index

    Properties

    format?: "zip"

    Archive format. Currently only 'zip'. Default: 'zip'.

    level?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

    fflate deflate compression level (0 = store, 1 = fastest, 9 = best compression). Default: 6.

    smartOptimize?: boolean

    When true, image and audio files are automatically compressed to optimized formats (WebP/MP3) before being added to the archive. Default: false.

    onProgress?: (percent: number) => void

    Called with progress 0–100 as entries are processed.

    signal?: AbortSignal

    Cancel the operation. Throws AbortError when signalled.