Deflate constructor
Deflate(
- List<
int> bytes, { - int level = DeflateLevel.defaultCompression,
- int windowBits = maxWindowBits,
- OutputStream? output,
Deflate the given bytes
.
level
is the compression level to use for the deflate algorithm. If not
provided, the default level of 6 is used.
If output
is provided, the compressed data will be written to that
OutputStream, otherwise the compressed data will be accessed from
the getBytes
method.
Implementation
Deflate(List<int> bytes,
{int level = DeflateLevel.defaultCompression,
int windowBits = maxWindowBits,
OutputStream? output})
: _input = InputMemoryStream(bytes),
_output = output ?? OutputMemoryStream() {
if (_init(level, windowBits: windowBits)) {
_deflate(_DeflateFlushMode.finish);
}
}