Interface CompressParameters

Zstandard compression parameters.

Most applications will only need the compressionLevel parameter. See the Zstandard manual for a full description.

interface CompressParameters {
    chainLog?: number;
    checksumFlag?: boolean;
    compressionLevel?: number;
    contentSizeFlag?: boolean;
    dictIDFlag?: boolean;
    enableLongDistanceMatching?: boolean;
    hashLog?: number;
    jobSize?: number;
    ldmBucketSizeLog?: number;
    ldmHashLog?: number;
    ldmHashRateLog?: number;
    ldmMinMatch?: number;
    minMatch?: number;
    nbWorkers?: number;
    overlapLog?: number;
    searchLog?: number;
    strategy?:
        | "fast"
        | "dfast"
        | "greedy"
        | "lazy"
        | "lazy2"
        | "btlazy2"
        | "btopt"
        | "btultra";
    targetCBlockSize?: number;
    targetLength?: number;
    windowLog?: number;
}

Advanced compression options

chainLog?: number
hashLog?: number
minMatch?: number
searchLog?: number
strategy?:
    | "fast"
    | "dfast"
    | "greedy"
    | "lazy"
    | "lazy2"
    | "btlazy2"
    | "btopt"
    | "btultra"
targetCBlockSize?: number
targetLength?: number
windowLog?: number

Basic parameters

compressionLevel?: number

Compression level, where higher numbers compress better but are slower.

Typical values range from 1 to 9, with a default of 3, but values up to 22 are allowed, as are negative values (see binding.minCLevel). Zero is interpreted as "use the default".

Frame parameters

checksumFlag?: boolean
contentSizeFlag?: boolean
dictIDFlag?: boolean

Long-distance matching

enableLongDistanceMatching?: boolean
ldmBucketSizeLog?: number
ldmHashLog?: number
ldmHashRateLog?: number
ldmMinMatch?: number

Multi-threading parameters

jobSize?: number
nbWorkers?: number
overlapLog?: number