Restore class abstract

A utility class for decompressing data that was compressed using the Shrink class.

This class provides static methods to decompress various data types:

  • bytes: Decompresses raw binary data using the optimal compression method (identity or ZLIB)
  • json: Decompresses and parses JSON objects
  • text: Decompresses strings encoded with UTF-8 and compressed with zlib
  • unique: Decompresses lists of unique integers

Example:

// Decompress bytes back to a string
final decompressed = Restore.text(compressedBytes);

// Decompress bytes back to a JSON object
final jsonData = Restore.json(jsonCompressedBytes);

Constructors

Restore.new()

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

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

Static Methods

bytes(Uint8List compressed) Uint8List
Decompresses a Uint8List that was compressed using Shrink.bytes.
json(Uint8List compressed) Map<String, dynamic>
Decompresses a Uint8List that was compressed using Shrink.json and converts it back to a JSON object.
text(Uint8List compressed) String
Decompresses a Uint8List that was compressed using Shrink.text and converts it back to a string.
unique(Uint8List compressed) List<int>
Decompresses a Uint8List that was compressed using Shrink.unique and converts it back to a list of unique integers.