Ipelib: ipe::DeflateStream Class Reference

Ipelib

Public Member Functions | Static Public Member Functions | List of all members
ipe::DeflateStream Class Reference
Ipe Utilities

`#include <ipeutils.h>`

Inherits ipe::Stream.

## Public Member Functions
| DeflateStream (Stream &stream, int level)
virtual | ~DeflateStream ()
virtual void | putChar (char ch)
virtual void | close ()
Public Member Functions inherited from ipe::Stream
virtual | ~Stream ()
virtual void | putString (String s)
virtual void | putCString (const char *s)
virtual void | putRaw (const char *data, int size)
Stream & | operator<< (char ch)
Stream & | operator<< (const String &s)
Stream & | operator<< (const char *s)
Stream & | operator<< (int i)
Stream & | operator<< (double d)
void | putHexByte (char b)
void | putXmlString (String s)

## Static Public Member Functions
static Buffer | deflate (const char *data, int size, int &deflatedSize, int compressLevel)

## Detailed Description

Filter stream adding flate compression.

## Constructor & Destructor Documentation

## ◆ DeflateStream()

DeflateStream::DeflateStream | ( | Stream & | stream,
|  | int | level
| ) |  |

## ◆ ~DeflateStream()

DeflateStream::~DeflateStream | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ putChar()

void DeflateStream::putChar | ( | char | ch | ) |
| virtual

Output character.

Implements ipe::Stream.

References ipe::Buffer::data(), deflate(), ipe::Stream::putRaw(), and ipe::Buffer::size().

## ◆ close()

void DeflateStream::close | ( |  | ) |
| virtual

Close the stream. No more writing allowed!

Reimplemented from ipe::Stream.

References ipe::Stream::close(), ipe::Buffer::data(), deflate(), ipe::Stream::putRaw(), and ipe::Buffer::size().

Referenced by ipe::PdfWriter::createPageView(), and ipe::Document::save().

## ◆ deflate()

Buffer DeflateStream::deflate | ( | const char * | data,
|  | int | size,
|  | int & | deflatedSize,
|  | int | compressLevel
| ) |  |
| static

Deflate a buffer in a single run.

The returned buffer may be larger than necessary: deflatedSize is set to the number of bytes actually used.

References ipe::Buffer::data().

Referenced by close(), ipe::Bitmap::embed(), putChar(), and ipe::PdfWriter::~PdfWriter().

The documentation for this class was generated from the following files:

- ipeutils.h
- ipeutils.cpp