decompress method Null safety
- [OutputStreamBase? output]
If the file data is compressed, decompress it.
Implementation
void decompress([OutputStreamBase? output]) {
if (_content == null && _rawContent != null) {
if (_compressionType == DEFLATE) {
if (output != null) {
Inflate.stream(_rawContent!, output);
} else {
_content = inflateBuffer(_rawContent!.toUint8List());
}
} else {
if (output != null) {
output.writeInputStream(_rawContent!);
} else {
_content = _rawContent!.toUint8List();
}
}
_compressionType = STORE;
}
}