Module jls.util.zip.Deflater
Provide compression using the ZLIB library.
Class Deflater
Deflater:new (compressionLevel, windowBits) | Creates a new Deflater with the specified compression level and window bits. |
deflater:deflate (buffer, flush) | Deflates the specified data. |
Class Deflater
The Deflater class.
A Deflater allows to compress data.
- Deflater:new (compressionLevel, windowBits)
-
Creates a new Deflater with the specified compression level and window bits.
Parameters:
- compressionLevel
number
the compression level from 1-9, from
BEST_SPEED
toBEST_COMPRESSION
- windowBits number the window bits
- compressionLevel
number
the compression level from 1-9, from
- deflater:deflate (buffer, flush)
-
Deflates the specified data.
Parameters:
Returns:
-
the deflated data