SnappyStreamCodec class final

Snappy streaming codec

Provides stream-based compression and decompression using the Snappy framing format. The framing format allows for streaming decompression and chunk-based processing.

Inheritance

Constructors

SnappyStreamCodec({int? maxSize = defaultMaxSize, int maxBufferSize = defaultMaxBufferSize, int chunkSize = SnappyStreamEncoder.maxChunkSize})
Creates a Snappy streaming codec
SnappyStreamCodec.fromOptions(SnappyOptions options)
Creates a Snappy stream codec from options. Streams always use the framing format, so SnappyOptions.format is ignored.
factory

Properties

chunkSize → int
Chunk size for compression (max 65536 per spec)
final
compressor → StreamTransformer<Uint8List, Uint8List>
Creates a stream transformer for compression
no setterinherited
decompressor → StreamTransformer<Uint8List, Uint8List>
Creates a stream transformer for decompression
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
maxBufferSize → int
Maximum buffer size for compressed data before rejecting
final
maxSize → int?
Maximum cumulative decompressed size across all chunks (null = unlimited; trusted input only).
final
name → String
The codec's name in upper case: 'NOOP', 'SNAPPY', 'GZIP', 'LZ4' or 'ZSTD'.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

compress(Stream<Uint8List> input) → Stream<Uint8List>
Compresses a stream of data chunks
override
decompress(Stream<Uint8List> input) → Stream<Uint8List>
Decompresses a stream of compressed data chunks
override
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