lib/gattica/engine.rb
# Decompress the JSON if GZIP is enabled
Decompress the JSON if GZIP is enabled
Decompress the JSON if GZIP is enabled
def decompress_gzip(response)
      if @options[:gzip]
        sio       = StringIO.new(response)
        gz        = Zlib::GzipReader.new(sio)
        response  = gz.read()
      end
      json = JSON.parse(response)
      return json
    end
def decompress_gzip ( response ) if @options [ :gzip ] sio = StringIO . new ( response ) gz = Zlib :: GzipReader . new ( sio ) response = gz . read ( ) end json = JSON . parse ( response ) return json end
Decompress the JSON if GZIP is enabled
Decompress the JSON if GZIP is enabled
response
<not_specific>