GeezerVison is showing netty.io — JZlibEncoder (Netty API Reference (4.1.141.Final))
Class JZlibEncoder
-
-
Constructor Summary
Constructors
Constructor
Description
Creates a new zlib encoder with the default compression level ( 6),
default window bits ( 15), default memory level ( 8),
and the default wrapper ( ZlibWrapper.ZLIB).
Creates a new zlib encoder with the default compression level (6),
default window bits (15), default memory level (8),
and the specified preset dictionary.
Creates a new zlib encoder with the specified compressionLevel,
default window bits ( 15), default memory level ( 8),
and the default wrapper ( ZlibWrapper.ZLIB).
Creates a new zlib encoder with the specified compressionLevel,
default window bits (15), default memory level (8),
and the specified preset dictionary.
JZlibEncoder(int compressionLevel,
int windowBits,
int memLevel,
byte[] dictionary)
Creates a new zlib encoder with the specified compressionLevel,
the specified windowBits, the specified memLevel,
and the specified preset dictionary.
Creates a new zlib encoder with the default compression level (6),
default window bits (15), default memory level (8),
and the specified wrapper.
Creates a new zlib encoder with the specified compressionLevel,
default window bits (15), default memory level (8),
and the specified wrapper.
Creates a new zlib encoder with the specified compressionLevel,
the specified windowBits, the specified memLevel, and
the specified wrapper.
-
Method Summary
Modifier and Type
Method
Description
void
protected void
void
Do nothing by default, sub-classes may override this method.
boolean
Returns true if and only if the end of the compressed stream
has been reached.
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
JZlibEncoder
public JZlibEncoder()
Creates a new zlib encoder with the default compression level ( 6),
default window bits ( 15), default memory level ( 8),
and the default wrapper ( ZlibWrapper.ZLIB).
- Throws:
CompressionException - if failed to initialize zlib
-
JZlibEncoder
public JZlibEncoder(int compressionLevel)
Creates a new zlib encoder with the specified compressionLevel,
default window bits ( 15), default memory level ( 8),
and the default wrapper ( ZlibWrapper.ZLIB).
- Parameters:
compressionLevel - 1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.
- Throws:
CompressionException - if failed to initialize zlib
-
JZlibEncoder
Creates a new zlib encoder with the default compression level (6),
default window bits (15), default memory level (8),
and the specified wrapper.
- Throws:
CompressionException - if failed to initialize zlib
-
JZlibEncoder
public JZlibEncoder(ZlibWrapper wrapper,
int compressionLevel)
Creates a new zlib encoder with the specified compressionLevel,
default window bits (15), default memory level (8),
and the specified wrapper.
- Parameters:
compressionLevel - 1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.
- Throws:
CompressionException - if failed to initialize zlib
-
JZlibEncoder
public JZlibEncoder(ZlibWrapper wrapper,
int compressionLevel,
int windowBits,
int memLevel)
Creates a new zlib encoder with the specified compressionLevel,
the specified windowBits, the specified memLevel, and
the specified wrapper.
- Parameters:
compressionLevel - 1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.
windowBits - The base two logarithm of the size of the history buffer. The
value should be in the range 9 to 15 inclusive.
Larger values result in better compression at the expense of
memory usage. The default value is 15.
memLevel - How much memory should be allocated for the internal compression
state. 1 uses minimum memory and 9 uses maximum
memory. Larger values result in better and faster compression
at the expense of memory usage. The default value is 8
- Throws:
CompressionException - if failed to initialize zlib
-
JZlibEncoder
public JZlibEncoder(byte[] dictionary)
Creates a new zlib encoder with the default compression level ( 6),
default window bits ( 15), default memory level ( 8),
and the specified preset dictionary. The wrapper is always
ZlibWrapper.ZLIB because it is the only format that supports
the preset dictionary.
- Parameters:
dictionary - the preset dictionary
- Throws:
CompressionException - if failed to initialize zlib
-
JZlibEncoder
public JZlibEncoder(int compressionLevel,
byte[] dictionary)
Creates a new zlib encoder with the specified compressionLevel,
default window bits ( 15), default memory level ( 8),
and the specified preset dictionary. The wrapper is always
ZlibWrapper.ZLIB because it is the only format that supports
the preset dictionary.
- Parameters:
compressionLevel - 1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.
dictionary - the preset dictionary
- Throws:
CompressionException - if failed to initialize zlib
-
JZlibEncoder
public JZlibEncoder(int compressionLevel,
int windowBits,
int memLevel,
byte[] dictionary)
Creates a new zlib encoder with the specified compressionLevel,
the specified windowBits, the specified memLevel,
and the specified preset dictionary. The wrapper is always
ZlibWrapper.ZLIB because it is the only format that supports
the preset dictionary.
- Parameters:
compressionLevel - 1 yields the fastest compression and 9 yields the
best compression. 0 means no compression. The default
compression level is 6.
windowBits - The base two logarithm of the size of the history buffer. The
value should be in the range 9 to 15 inclusive.
Larger values result in better compression at the expense of
memory usage. The default value is 15.
memLevel - How much memory should be allocated for the internal compression
state. 1 uses minimum memory and 9 uses maximum
memory. Larger values result in better and faster compression
at the expense of memory usage. The default value is 8
dictionary - the preset dictionary
- Throws:
CompressionException - if failed to initialize zlib
-
Method Details
-
-
-
isClosed
public boolean isClosed()
Returns true if and only if the end of the compressed stream
has been reached.
- Specified by:
isClosed in class ZlibEncoder
-
-
-
|