Skip to content
Andrew Lambert edited this page Nov 26, 2022 · 14 revisions

zlib.ZStream.Level

Property declaration

 Dim Level As Integer

Remarks

Gets and sets the compression level for the stream. Valid levels are Z_BEST_SPEED(1) to Z_BEST_COMPRESSION(9). 0 means no compression. Specify Z_DEFAULT_COMPRESSION(-1) to use the default level, which is equivalent to level 6.

The compression level controls the tradeoff between compression speed and compression ratio. Faster compression results in worse compression ratios.

Changes to this property will affect subsequent calls to Write. Input from previous calls to Write which have already been fed to the compressor but not yet emitted as output will use the previous Level.

See also

Entry-level points of interest denoted by "☜"



Clone this wiki locally