       req.end data
       req.on 'response', (res) -> cb res.statusCode != 200, res
 
+  getJSONGzipped: (filename, headers, cb) ->
+    if arguments.length == 2
+      cb = headers
+      headers = {}
+
+    @getGzip parseJSON: true, filename, headers, cb
+
   getGzip: (opts, filename, headers, cb) ->
+
     if arguments.length == 2
       cb = headers
       headers = {}

zlib  = require 'zlib'
async = require 'async'
knox  = require 'knox'

module.exports = class knoxSteroids extends knox


      opts = parseJSON: false

    filename = filename.toString()
    headers['Accept-Encoding'] = 'gzip'

    req = @get filename, headers

    registerReqListeners req, (err, res) ->
      return cb(err) if (err)

      gunzip = zlib.createGunzip()
      res.pipe gunzip
      buffer = ''

      gunzip.on 'data', (data) ->
        buffer += data.toString 'utf8'

      gunzip.on 'end', ->
        result = if opts.parseJSON then JSON.parse buffer else buffer.toString()
        cb null, result

      gunzip.on 'error', cb

    req.end()
    req

  getJSON: (filename, headers, cb) ->
    if arguments.length == 2
