takeBytes method Null safety

List<int> takeBytes()

Get the resulting compressed bytes without storing the resulting data to minimize memory usage.

Implementation

List<int> takeBytes() {
  _flushPending();
  final bytes = _output.getBytes() as List<int>;
  _output.clear();
  return bytes;
}