GzipCodec class

GZip codec for compressing and decompressing text using GZip algorithm.

This codec provides GZip compression and decompression functionality using Dart's built-in gzip implementation. The compressed data is returned as a Base64-encoded string for easy text handling.

Example:

final codec = GzipCodec();
final compressed = codec.encode('This is a long text that will be compressed...');
final decompressed = codec.decode(compressed);
Implemented types

Constructors

GzipCodec.new({int level = 6})
Creates a new GZip codec instance.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
level int
The compression level used for GZip compression.
final
name String
Returns the name/identifier of this codec.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(String input) String
Decodes the input string using the codec's specific algorithm.
override
encode(String input) String
Encodes the input string using the codec's specific algorithm.
override
isValidInput(String input) bool
Optional method to validate if input can be processed by this codec.
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