LZFChunk class final
A chunk of LZF-encoded data, which may be either compressed or uncompressed.
LZF compresses data into segments (chunks), each starting with a header indicating whether it is compressed or uncompressed. Chunks can be linked together to form a complete LZF-encoded file.
Constructors
- LZFChunk(Uint8List bytes)
-
Creates an LZF chunk from the provided
bytes. - LZFChunk.compressed(Uint8List compressed, int uncompressedLength)
-
Creates a compressed LZF chunk from
compresseddata.factory - LZFChunk.uncompressed(Uint8List uncompressed)
-
Creates an uncompressed LZF chunk from
uncompresseddata.factory
Properties
- bytes → Uint8List
-
The raw bytes representing this LZF chunk, including the header.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
Returns the total length of this chunk in bytes.
no setter
- next ↔ LZFChunk?
-
The next LZF chunk in the sequence, if any.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyTo(
Uint8List destination, {int offset = 0}) → int -
Copies this chunk's bytes into the
destinationbuffer at the givenoffset. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isValidChunk(
Uint8List data) → bool -
Validates whether the given
datafollows the LZF format.
Constants
- blockTypeCompressed → const int
- Indicates an LZF block that contains compressed data.
- blockTypeUncompressed → const int
- Indicates an LZF block that contains uncompressed (raw) data.
- byteV → const int
-
The first magic byte in an LZF block, representing
'Z'. - byteZ → const int
-
The second magic byte in an LZF block, representing
'V'. - headerLengthCompressed → const int
- The length of the header for a compressed LZF block.
- headerLengthUncompressed → const int
- The length of the header for an uncompressed LZF block.
- maxChunkLength → const int
- The maximum allowable length for an LZF chunk (65,535 bytes).
- maxHeaderLength → const int
- The maximum header length of a LZF block.
- maxLiteral → const int
- The maximum length of a literal run in LZF encoding.