Lz4Codec class

The Lz4Codec encodes raw bytes to Lz4 compressed bytes and decodes Lz4 compressed bytes to raw bytes using the Lz4 frame format.

Inheritance

Constructors

Lz4Codec({int level = Lz4Option.defaultLevel, bool fastAcceleration = false, bool contentChecksum = false, bool blockChecksum = false, bool blockLinked = true, int blockSize = Lz4Option.defaultBlockSize, bool optimizeForDecompression = false, int inputBufferLength = CodecBufferHolder.autoLength, int outputBufferLength = CodecBufferHolder.autoLength})
Construct an Lz4Codec that is configured with the following parameters.

Properties

bindingVersion Lz4Version
Return the base binding version this binding code was developed for.
no setter
blockChecksum bool
When true, a checksum is added to the end of each block during compression, and validates the block data during decompression. The default value is false.
final
blockLinked bool
When true, blocks are compressed in linked mode which dramatically improves compression, specifically for small blocks. The default value is true.
final
blockSize int
The maximum size to use for blocks. The larger the block, the (slightly) better compression ratio. However, more memory is consumed for both compression and decompression. The default value is blockSize64KB.
final
contentChecksum bool
When true, a checksum is added to the end of a frame during compression, and checked during decompression. An enabled, all blocks are present and in the correct order. The default value is false.
final
decoder Converter<List<int>, List<int>>
Return the lz4 decoder configured implementation.
no setteroverride
encoder Converter<List<int>, List<int>>
Return the lz4 encoder configured implementation.
no setteroverride
fastAcceleration bool
When true, use ultra-fast compression speed mode, at the cost of some compression ratio. The default value is false.
final
hashCode int
The hash code for this object.
no setterinherited
inputBufferLength int
Length in bytes of the buffer used for input data.
final
inverted Codec<List<int>, List<int>>
Inverts this.
no setterinherited
level int
The compression-level can be set in the range of 0..16, with 0 (fast mode) being the default compression level.
final
libraryVersion Lz4Version
Return the actual library version of the shared library.
no setter
optimizeForDecompression bool
When true, generate compress data optimized for decompression speed. The size of the compressed data may be slightly larger, however the decompression speed should be improved. Note: This option will be ignored if level < 9.
final
outputBufferLength int
Length in bytes of the buffer used for processed output data.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(List<int> encoded) List<int>
Decodes encoded data.
inherited
encode(List<int> input) List<int>
Encodes input.
inherited
fuse<R>(Codec<List<int>, R> other) Codec<List<int>, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

libraryPath String?
Return the library path String or null if not set.
getter/setter pair