class Sprockets::Utils::Gzip

def can_compress?(mime_types)

Return Boolean.

through a compression algorithm would make them larger.
files as they may already be compressed and running them
You do not want to compress binary
We want to compress any file that is text based.

Private: Returns whether or not an asset can be compressed.
def can_compress?(mime_types)
  # The "charset" of a mime type is present if the value is
  # encoded text. We can check this value to see if the asset
  # can be compressed.
  #
  # We also check against our list of non-text compressible mime types
  @charset || COMPRESSABLE_MIME_TYPES.include?(@content_type)
end