From 10ab2e8512cb40f2560eefc5a9bfd9be97916c41 Mon Sep 17 00:00:00 2001 From: jules Date: Sat, 15 Dec 2007 12:24:22 +0000 Subject: [PATCH] --- .../io/streams/juce_GZIPCompressorOutputStream.cpp | 9 ++++----- .../io/streams/juce_GZIPCompressorOutputStream.h | 5 ++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp b/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp index ba0337788d..ab974a45ce 100644 --- a/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp +++ b/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.cpp @@ -51,7 +51,7 @@ private: public: bool finished, shouldFinish; - GZIPCompressorHelper (const int compressionLevel) + GZIPCompressorHelper (const int compressionLevel, const bool nowrap) : data (0), dataSize (0), compLevel (compressionLevel), @@ -62,8 +62,6 @@ public: { stream = (z_stream*) juce_calloc (sizeof (z_stream)); - bool nowrap = false; - if (deflateInit2 (stream, compLevel, Z_DEFLATED, @@ -136,14 +134,15 @@ const int bufferSize = 32768; GZIPCompressorOutputStream::GZIPCompressorOutputStream (OutputStream* const destStream_, int compressionLevel, - const bool deleteDestStream_) + const bool deleteDestStream_, + const bool noWrap) : destStream (destStream_), deleteDestStream (deleteDestStream_) { if (compressionLevel < 1 || compressionLevel > 9) compressionLevel = -1; - helper = new GZIPCompressorHelper (compressionLevel); + helper = new GZIPCompressorHelper (compressionLevel, noWrap); buffer = (uint8*) juce_malloc (bufferSize); } diff --git a/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.h b/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.h index d8951c7b7e..6982051af7 100644 --- a/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.h +++ b/src/juce_core/io/streams/juce_GZIPCompressorOutputStream.h @@ -55,10 +55,13 @@ public: indicates that a default compression level should be used. @param deleteDestStreamWhenDestroyed whether or not to delete the destStream object when this stream is destroyed + @param noWrap this is used internally by the ZipFile class + and should be ignored by user applications */ GZIPCompressorOutputStream (OutputStream* const destStream, int compressionLevel = 0, - const bool deleteDestStreamWhenDestroyed = false); + const bool deleteDestStreamWhenDestroyed = false, + const bool noWrap = false); /** Destructor. */ ~GZIPCompressorOutputStream();