GeezerVison is showing netty.io — LzfEncoder (Netty API Reference (4.1.141.Final))
Class LzfEncoder
-
-
Constructor Summary
Constructors
Constructor
Description
Creates a new LZF encoder with the most optimal available methods for underlying data access.
Deprecated.
Use the constructor without the safeInstance parameter.
Deprecated.
Use the constructor without the safeInstance parameter.
LzfEncoder(boolean safeInstance,
int totalLength,
int compressThreshold)
Deprecated.
Use the constructor without the safeInstance parameter.
Creates a new LZF encoder with specified total length of encoded chunk.
LzfEncoder(int totalLength,
int compressThreshold)
Creates a new LZF encoder with specified settings.
-
Method Summary
Modifier and Type
Method
Description
protected void
void
Do nothing by default, sub-classes may override this method.
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
LzfEncoder
public LzfEncoder()
Creates a new LZF encoder with the most optimal available methods for underlying data access.
It will "unsafe" instance if one can be used on current JVM.
It should be safe to call this constructor as implementations are dynamically loaded; however, on some
non-standard platforms it may be necessary to use LzfEncoder(boolean) with true param.
-
LzfEncoder
Deprecated.
Use the constructor without the safeInstance parameter.
Creates a new LZF encoder with specified encoding instance.
- Parameters:
safeInstance - If true encoder will use ChunkEncoder that only uses
standard JDK access methods, and should work on all Java platforms and JVMs.
Otherwise encoder will try to use highly optimized ChunkEncoder
implementation that uses Sun JDK's Unsafe
class (which may be included by other JDK's as well).
-
LzfEncoder
@Deprecated
public LzfEncoder(boolean safeInstance,
int totalLength)
Deprecated.
Use the constructor without the safeInstance parameter.
Creates a new LZF encoder with specified encoding instance and compressThreshold.
- Parameters:
safeInstance - If true encoder will use ChunkEncoder that only uses standard
JDK access methods, and should work on all Java platforms and JVMs.
Otherwise encoder will try to use highly optimized ChunkEncoder
implementation that uses Sun JDK's Unsafe
class (which may be included by other JDK's as well).
totalLength - Expected total length of content to compress; only matters for outgoing messages
that is smaller than maximum chunk size (64k), to optimize encoding hash tables.
-
LzfEncoder
public LzfEncoder(int totalLength)
Creates a new LZF encoder with specified total length of encoded chunk. You can configure it to encode
your data flow more efficient if you know the average size of messages that you send.
- Parameters:
totalLength - Expected total length of content to compress;
only matters for outgoing messages that is smaller than maximum chunk size (64k),
to optimize encoding hash tables.
-
LzfEncoder
public LzfEncoder(int totalLength,
int compressThreshold)
Creates a new LZF encoder with specified settings.
- Parameters:
totalLength - Expected total length of content to compress; only matters for outgoing messages
that is smaller than maximum chunk size (64k), to optimize encoding hash tables.
compressThreshold - Compress threshold for LZF format. When the amount of input data is less than
compressThreshold, we will construct an uncompressed output according
to the LZF format.
-
LzfEncoder
@Deprecated
public LzfEncoder(boolean safeInstance,
int totalLength,
int compressThreshold)
Deprecated.
Use the constructor without the safeInstance parameter.
Creates a new LZF encoder with specified settings.
- Parameters:
safeInstance - If true encoder will use ChunkEncoder that only uses standard JDK
access methods, and should work on all Java platforms and JVMs.
Otherwise encoder will try to use highly optimized ChunkEncoder
implementation that uses Sun JDK's Unsafe
class (which may be included by other JDK's as well).
totalLength - Expected total length of content to compress; only matters for outgoing messages
that is smaller than maximum chunk size (64k), to optimize encoding hash tables.
compressThreshold - Compress threshold for LZF format. When the amount of input data is less than
compressThreshold, we will construct an uncompressed output according
to the LZF format.
-
|