# File lib/feedzirra/feed.rb, line 145 def self.decode_content(c) if c.header_str.match(/Content-Encoding: gzip/) begin gz = Zlib::GzipReader.new(StringIO.new(c.body_str)) xml = gz.read gz.close rescue Zlib::GzipFile::Error # Maybe this is not gzipped? xml = c.body_str end elsif c.header_str.match(/Content-Encoding: deflate/) xml = Zlib::Inflate.inflate(c.body_str) else xml = c.body_str end xml end