1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-12-15 12:24:22 +00:00
parent fe3524b443
commit 10ab2e8512
2 changed files with 8 additions and 6 deletions

View file

@ -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);
}

View file

@ -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();