Loading...
Searching...
No Matches
juce_GZIPCompressorOutputStream.h
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2022 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
The code included in this file is provided under the terms of the ISC license
http://www.isc.org/downloads/software-support-policy/isc-license. Permission
To use, copy, modify, and/or distribute this software for any purpose with or
without fee is hereby granted provided that the above copyright notice and
this permission notice appear in all copies.
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
DISCLAIMED.
==============================================================================
*/
namespace juce
{
//==============================================================================
class JUCE_API GZIPCompressorOutputStream : public OutputStream
{
public:
//==============================================================================
GZIPCompressorOutputStream (OutputStream& destStream,
int compressionLevel = -1,
int windowBits = 0);
GZIPCompressorOutputStream (OutputStream* destStream,
int compressionLevel = -1,
bool deleteDestStreamWhenDestroyed = false,
int windowBits = 0);
~GZIPCompressorOutputStream() override;
//==============================================================================
void flush() override;
int64 getPosition() override;
bool setPosition (int64) override;
bool write (const void*, size_t) override;
enum WindowBitsValues
{
windowBitsRaw = -15,
windowBitsGZIP = 15 + 16
};
private:
//==============================================================================
OptionalScopedPointer<OutputStream> destStream;
class GZIPCompressorHelper;
std::unique_ptr<GZIPCompressorHelper> helper;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GZIPCompressorOutputStream)
};
} // namespace juce
juce::GZIPCompressorOutputStream
Definition juce_GZIPCompressorOutputStream.h:39
juce::GZIPCompressorOutputStream::GZIPCompressorOutputStream
GZIPCompressorOutputStream(OutputStream &destStream, int compressionLevel=-1, int windowBits=0)
Definition juce_GZIPCompressorOutputStream.cpp:116
juce::GZIPCompressorOutputStream::setPosition
bool setPosition(int64) override
Definition juce_GZIPCompressorOutputStream.cpp:151
juce::GZIPCompressorOutputStream::WindowBitsValues
WindowBitsValues
Definition juce_GZIPCompressorOutputStream.h:93
juce::GZIPCompressorOutputStream::write
bool write(const void *, size_t) override
Definition juce_GZIPCompressorOutputStream.cpp:139
juce::GZIPCompressorOutputStream::flush
void flush() override
Definition juce_GZIPCompressorOutputStream.cpp:133
juce::GZIPCompressorOutputStream::getPosition
int64 getPosition() override
Definition juce_GZIPCompressorOutputStream.cpp:146
juce::OptionalScopedPointer
Definition juce_OptionalScopedPointer.h:38