Compressor class.
More...
#include <Compressor.h>
|
| void * | stream |
| |
| size_t | cap = 0 |
| | Represents allocated buffer size.
|
| |
| size_t | length = 0 |
| | Represents filled buffer size.
|
| |
| size_t | read = 0 |
| | Represents read portion of the buffer.
|
| |
| unsigned char * | buffer |
| | Internal buffer.
|
| |
◆ OutputStream
◆ Compressor()
Create a compressor
- Parameters
-
| type | Compression format - GZIP option is not recommended here |
| level | Compression level |
| buffer_size | Set internal buffer size |
References buffer, cap, and stream.
◆ ~Compressor()
| sese::Compressor::~Compressor |
( |
| ) |
|
|
virtual |
◆ deflate()
Perform compression
- Parameters
-
| out | Output stream for compressed data |
- Return values
-
| Z_OK | (0) Current buffer block compressed successfully |
| Z_STREAM_ERROR | (-2) Other errors |
| Z_BUF_ERROR | (-5) Output stream capacity insufficient |
References read(), and sese::io::OutputStream::write().
◆ getTotalIn()
| size_t sese::Compressor::getTotalIn |
( |
| ) |
const |
|
nodiscard |
Size of the currently processed input buffer
- Returns
- Buffer size
◆ getTotalOut()
| size_t sese::Compressor::getTotalOut |
( |
| ) |
const |
|
nodiscard |
Size of the currently processed output buffer
- Returns
- Buffer size
References read().
◆ input()
| void sese::Compressor::input |
( |
const void * | input, |
|
|
unsigned int | input_size ) |
Set the buffer to be compressed
- Parameters
-
| input | Buffer to be compressed |
| input_size | Size of this buffer |
◆ reset()
| int sese::Compressor::reset |
( |
| ) |
|
◆ buffer
| unsigned char* sese::Compressor::buffer |
|
private |
◆ cap
| size_t sese::Compressor::cap = 0 |
|
private |
Represents allocated buffer size.
Referenced by Compressor().
◆ length
| size_t sese::Compressor::length = 0 |
|
private |
Represents filled buffer size.
◆ read
| size_t sese::Compressor::read = 0 |
|
private |
Represents read portion of the buffer.
◆ stream
| void* sese::Compressor::stream |
|
private |
The documentation for this class was generated from the following files: