title: Decompressing GZip in Haskell
body: <p>I'm having a hard time figuring this out. Here's what I'm trying:</p>
  
  <pre><code>ghci&gt; :m +System.FileArchive.GZip  -- From the "MissingH" package
  ghci&gt; fmap decompress $ readFile "test.html.gz"
  *** Exception: test.html.gz: hGetContents: invalid argument (invalid byte sequence)
  </code></pre>
  
  <p>Why am I getting that exception?</p>
  
  <p>I also tried <code>Codec.Compression.GZip.decompress</code> from the <a href="http://hackage.haskell.org/package/zlib-0.5.3.3" rel="nofollow">zlib package</a>, but I can't get the types to work out to <code>String</code> instead of <code>ByteString</code>.</p>