18#ifndef _DECAF_UTIL_ZIP_DEFLATEROUTPUTSTREAM_H_
19#define _DECAF_UTIL_ZIP_DEFLATEROUTPUTSTREAM_H_
50 std::vector<unsigned char>
buf;
92 bool own =
false,
bool ownDeflater =
false);
115 int bufferSize,
bool own =
false,
bool ownDeflater =
false);
This class is the superclass of all classes that filter output streams.
Definition: FilterOutputStream.h:49
Base interface for any class that wants to represent an output stream of bytes.
Definition: OutputStream.h:39
This class compresses data using the DEFLATE algorithm (see specification).
Definition: Deflater.h:52
Provides a FilterOutputStream instance that compresses the data before writing it to the wrapped Outp...
Definition: DeflaterOutputStream.h:39
DeflaterOutputStream(decaf::io::OutputStream *outputStream, bool own=false)
Creates a new DeflateOutputStream with a Default Deflater and buffer size.
Deflater * deflater
The Deflater for this stream.
Definition: DeflaterOutputStream.h:45
DeflaterOutputStream(decaf::io::OutputStream *outputStream, Deflater *deflater, bool own=false, bool ownDeflater=false)
Creates a new DeflateOutputStream with a user supplied Deflater and a default buffer size.
static const std::size_t DEFAULT_BUFFER_SIZE
Definition: DeflaterOutputStream.h:55
virtual void close()
Closes this object and deallocates the appropriate resources.The object is generally no longer usable...
bool ownDeflater
Definition: DeflaterOutputStream.h:52
virtual ~DeflaterOutputStream()
virtual void deflate()
Writes a buffers worth of compressed data to the wrapped OutputStream.
virtual void doWriteByte(unsigned char value)
std::vector< unsigned char > buf
The Buffer to use for.
Definition: DeflaterOutputStream.h:50
bool isDone
Definition: DeflaterOutputStream.h:53
virtual void finish()
Finishes writing any remaining data to the wrapped OutputStream but does not close it upon completion...
virtual void doWriteArrayBounded(const unsigned char *buffer, int size, int offset, int length)
DeflaterOutputStream(decaf::io::OutputStream *outputStream, Deflater *deflater, int bufferSize, bool own=false, bool ownDeflater=false)
Creates a new DeflateOutputStream with a user supplied Deflater and specified buffer size.
#define DECAF_API
Definition: Config.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition: AprPool.h:25