title: Can someone explain the difference between django's gzip packages
body: <p>It seems like they have a gzip_page decorator for views</p>
  
  <pre><code>from django.views.decorators.gzip import gzip_page
  
  @gzip_page
  def viewFunc(request):
     return HttpResponse("hello"*100)
  </code></pre>
  
  <p>Reference here: <a href="https://docs.djangoproject.com/en/1.4/topics/http/decorators/#module-django.views.decorators.gzip" rel="nofollow">https://docs.djangoproject.com/en/1.4/topics/http/decorators/#module-django.views.decorators.gzip</a></p>
  
  <p>as well as a middleware class you can add to settings and then use.</p>
  
  <pre><code>MIDDLEWARE_CLASSES = (
   django.middleware.gzip.GZipMiddleware,
   ...
  
  )
  </code></pre>
  
  <hr>
  
  <pre><code>from django.middleware.gzip import GZipMiddleware
  gzip_middleware = GZipMiddleware()
  def dec(request, *args, **kwargs):
      response = func(request, *args, **kwargs)
      return gzip_middleware.process_response(request, response)
      return dec
  </code></pre>
  
  <hr>
  
  <p>Using the page decorator kind of sped up the rendering of a huge ammt. of data (for a table), was wondering which way was best/ what the differences were.</p>
  
  <p>Thanks for any info!</p>