<div class="gmail_quote">On Tue, Jul 19, 2011 at 7:11 AM, Jesse Phillips <span dir="ltr"><<a href="mailto:jessekphillips%2BD@gmail.com">jessekphillips+D@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">Andrew Wiley Wrote:<br>
<br>
> I'm using std.zlib in an application, and I'm having trouble decompressing a<br>
> file. The file is gzipped, and I can easily see the contents with `cat file<br>
> | gzip -d` but this code doesn't work:<br>
> auto arr = read("file.gz");<br>
> ubyte[] realarr = cast(ubyte[])uncompress(arr);<br>
<br>
</div>The zlib format is different from the gzip format.<br>
<br>
<a href="http://www.zlib.net/zlib_faq.html#faq18" target="_blank">http://www.zlib.net/zlib_faq.html#faq18</a><br>
<br>
One is made for file storage and the other internal data transfer. D does not provide a wrapper to the gzip functions at this time but they are available in std.c.zlib (with the C interface).<br></blockquote><div><br></div>

<div>I know, but if you look at the docs for the inflate functions, zlib is supposed to be autodetecting the gzip header and uncompressing the payload correctly, if I understand the documentation (which I probably don't at this point). </div>

</div><br>