encode static method

List<int> encode(
  1. List<int> data
)

Compress data with gzip. Returns the gzipped bytes. On the VM this is dart:io.gzip.encode(data). On the browser it throws unless a polyfill is set.

Implementation

static List<int> encode(List<int> data) {
  if (_encoderOverride != null) {
    return _encoderOverride!(data);
  }
  return codec.gzipEncode(data);
}