Method: Webhookdb::Http.gzipped?

Defined in:
lib/webhookdb/http.rb

.gzipped?(string) ⇒ Boolean

Returns:

  • (Boolean)


109
110
111
112
113
# File 'lib/webhookdb/http.rb', line 109

def self.gzipped?(string)
  return false if string.length < 3
  b = string[..2].bytes
  return b[0] == 0x1f && b[1] == 0x8b
end