# Uncompressing gzip files?

**URL:** <https://forum.juce.com/t/uncompressing-gzip-files/2997>\
**Category:** General JUCE discussion\
**Created:** [July 2, 2008, 8:15am UTC](https://forum.juce.com/t/uncompressing-gzip-files/2997 "2008-07-02T08:15:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![robiwan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/robiwan/32/2446_2.png) [@robiwan](https://forum.juce.com/u/robiwan)\
**Post date:** [July 2, 2008, 8:15am UTC](https://forum.juce.com/t/uncompressing-gzip-files/2997/1 "2008-07-02T08:15:59Z")

</div>

Trying to uncompress files compressed via gzip using GZIPDecompressorInputStream, but it doesn’t work at all. Any tip on compress method that works with GZIPDecompressorInputStream ?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 2, 2008, 8:38am UTC](https://forum.juce.com/t/uncompressing-gzip-files/2997/2 "2008-07-02T08:38:55Z")

</div>

I think the format’s probably the same, but maybe there’s a header? You could always use zip files and the ZipFile class…

---

<div class="post-metadata">

**Author:** ![robiwan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/robiwan/32/2446_2.png) [@robiwan](https://forum.juce.com/u/robiwan)\
**Post date:** [July 2, 2008, 8:47am UTC](https://forum.juce.com/t/uncompressing-gzip-files/2997/3 "2008-07-02T08:47:49Z")

</div>

> [@jules](#):
>
> I think the format’s probably the same, but maybe there’s a header? You could always use zip files and the ZipFile class…

Probably so. Going with the zip file. However, I have a request for ZipFile::uncompressTo . Since the destination can reside on a cached drive, you should do out-\>flush() so that the content is safely stored. Or at least add it as an option argument to ZipFile::uncompressTo.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 2, 2008, 9:04am UTC](https://forum.juce.com/t/uncompressing-gzip-files/2997/4 "2008-07-02T09:04:00Z")

</div>

But it already deletes the stream that it uses, and that will flush it… Or am I misunderstanding you?

---

<div class="post-metadata">

**Author:** ![robiwan](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/robiwan/32/2446_2.png) [@robiwan](https://forum.juce.com/u/robiwan)\
**Post date:** [July 2, 2008, 9:08am UTC](https://forum.juce.com/t/uncompressing-gzip-files/2997/5 "2008-07-02T09:08:37Z")

</div>

> [@jules](#):
>
> But it already deletes the stream that it uses, and that will flush it… Or am I misunderstanding you?

Quite right, sorry Jules. Missed the flush() in the destructor.
