title: OWIN compression middleware for selfhost scenario
body: <p>We have an OWIN application (built with Nancy and WebAPI).</p>
  
  <p>When hosting it in a console application (with Katana selfhost), I don't have any compression enabled on static content.</p>
  
  <p>I've tried to look for a <strong>working</strong> example of OWIN GZip middleware.</p>
  
  <p>So far found a few like:
  <code>Owin.Compression</code> nuget,
  <code>SqueezeMe</code> nuget,
  <a href="https://gist.github.com/PinpointTownes/538cde1ed5e5d768355d" rel="nofollow">https://gist.github.com/PinpointTownes/538cde1ed5e5d768355d</a>
  and
  <a href="https://gist.github.com/PinpointTownes/ac7059733afcf91ec319" rel="nofollow">https://gist.github.com/PinpointTownes/ac7059733afcf91ec319</a></p>
  
  <p>nothing seems to work - in the end the browser gets all responses without the <code>Content-Encoding</code> header and not compressed.</p>
  
  <p>Tried adding compression in the end of Nancy's pipeline - doesn't work either.</p>
  
  <p>While hosting in IIS - the IIS takes care of the compression.</p>
  
  <p>Am I missing something? Is there something that overwrites the response body stream and removes the headers? Or, maybe, the host itself should take care of the compression?</p>
  
  <p>From additional reading, this could be related to the Katana host.
  But the issue also happens in Nowin host.</p>
  
  <p>Thanks.</p>