 
 module.exports.middleware = (req, res, next) =>
   
+  @gzip = req.headers['accept-encoding'].toLowerCase().indexOf('gzip') isnt -1
+  
   return unless @mode is 'development'
   
   @usingMiddleware = true

# @param {String} pkg The name of the package to output
# @return {String} Style tag pointing to the ouput package(s)

module.exports.css = (pkg, gzip = @gzip) =>
  throw new Error "Cannot find package '#{pkg}'" unless @assets.css[pkg]?
  
  if @mode is 'production'
    src = (@cdnUrl ? @_assetsDir) + '/' + pkg + '.css'
    src += '.cgz' if gzip
    return "<link href='#{src}' rel='stylesheet' type='text/css'>"
  
  output = ''

# @param {String} pkg The name of the package to output
# @return {String} Script tag pointing to the ouput package(s)

module.exports.js = (pkg) =>
  throw new Error "Cannot find package '#{pkg}'" unless @assets.js[pkg]?
  
  if @mode is 'production'
    src = (@cdnUrl ? @_assetsDir) + '/' + pkg + '.js'
    src += '.jgz' if @acceptsGzip
    return "<script src='#{src}' type='text/javascript'></script>"
  
  output = ''
