ChunkEncoder class final

Encodes raw data into LZF chunks.

This encoder attempts to compress the input data if it's large enough (at least 16 bytes) and if the compression ratio is good enough to yield savings, and falls back to storing it uncompressed otherwise.

Constructors

ChunkEncoder({required int length})
Creates a ChunkEncoder with an internal hash table sized based on the provided length.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

encode(Uint8List data, {int offset = 0, int? length}) LZFChunk
Encodes data (from offset for an optional length) into a LZF chunk.
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

Constants

minBlockToCompress → const int
Minimum block size to attempt compression.