windowBits

PwindowBits
Bun

Symbol

ZlibCompressionOptions.windowBits

windowBits?: 25 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 28 | -9 | -10 | -11 | -12 | -13 | -14 | -15 | 26 | 27 | 29 | 30 | 31

The base 2 logarithm of the window size (the size of the history buffer).

Larger values of this parameter result in better compression at the expense of memory usage.

The following value ranges are supported:

  • 9..15: The output will have a zlib header and footer (Deflate)
  • -9..-15: The output will not have a zlib header or footer (Raw Deflate)
  • 25..31 (16+9..15): The output will have a gzip header and footer (gzip)

The gzip header will have no file name, no extra data, no comment, no modification time (set to zero) and no header CRC.