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
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