title: GZip Compression - Sending PDF Stream in Response.OutputStream
body: <p>I have a website deployed in IIS, where user can view PDF files on browser (using embedded html object) or download large PDF files. Currently on server side, I am sending PDFStream in <strong>Response.OutputStream.Write</strong>. I want to improve performance by introducing compression feature. Recently I came across GZip compression feature but I need clarification on the following points.</p>
  
  <ol>
  <li>If Dynamic compression is enabled for my website on IIS level. In order to send a compressed gzip content response to browser, do I still need to implement/modify code for sending compressed PDF stream using System.IO.GZipStream? or the dynamic compression setting on IIS level will do the job for me?</li>
  <li>I am also using embedded html object to show PDF files in web site, are there any suggestions for optimizing performance for displaying PDF? html object uses pdf path to display the PDF and I need some assistance in finding a way to serve compressed PDF content to html object for faster loading.
  <code>&lt;object data="data/test.pdf" type="application/pdf" width="300"
  height="200"&gt;</code></li>
  </ol>
  
  <p>Thank you in advance for the assitance on the subject.</p>