title: How to get the original file extension after INFLATE?
body: <p>I'm using zlib and C++ to compress/decompress files. </p>
  
  <p>I can now deflate any file and put it to .z extension. But when inflating .z file I have to manually put the needed extension. Inflating works as it should and I can easily inflate .z file to stdout or file.</p>
  
  <p>I 've read <a href="http://www.zlib.net/manual.html" rel="nofollow">zlib manual</a> but couldn't manage, how to solve my problem. I suppose I need to dig the archive's header for this information? </p>
  
  <p>Any help would be appreciated, thanks!</p>