bytes static method
Decompresses a Uint8List that was compressed using Shrink.bytes.
This function reads the compression method from the first byte and applies the appropriate decompression algorithm:
- Identity (no compression)
- ZLIB decompression for ZLIB-compressed data
Note: For backward compatibility, it also supports legacy compression methods from versions prior to 1.5.6.
Returns the original uncompressed Uint8List. Throws ArgumentError if the input is empty. Throws UnsupportedError if the compression method is unknown. May throw FormatException if the compressed data is corrupted.
Implementation
static Uint8List bytes(Uint8List compressed) {
return restoreBytes(compressed);
}