aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/compressionOptions.mjs
blob: 3f2d2269feec15e4cded6c000afbf7501cc007b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 * Copyright (c) 2024 Kristóf Marussy <kristof@marussy.com>
 *
 * SPDX-License-Identifier: MIT
 */

import zlib from 'node:zlib';

export const minRatio = 0.8;

/** @type {import('node:zlib').ZlibOptions} */
export const gzipOptions = {
  level: 9,
};

/** @type {import('node:zlib').BrotliOptions} */
export const brotliOptions = {
  params: {
    [zlib.constants.BROTLI_PARAM_QUALITY]: 11,
  },
};