shouldCompress method

bool shouldCompress(
  1. String? contentType
)

Check if content type should be compressed

Implementation

bool shouldCompress(String? contentType) {
  if (contentType == null || type == CompressionType.none) return false;

  return compressibleTypes.any((pattern) => pattern.hasMatch(contentType));
}