nlib
nn::nlib::ZlibOutputStreamSettings Struct Reference

The structure that stores the various ZlibOutputStream settings. At construction time, the default settings are stored. More...

#include "nn/nlib/ZlibOutputStream.h"

Public Types

typedef void *(* ReallocFunc) (void *p, size_t n) NLIB_NOEXCEPT_FUNCPTR
 The type for functions compatible with realloc.
 

Public Member Functions

constexpr ZlibOutputStreamSettings () noexcept
 Instantiates the object with default parameters (default constructor). Sets the default values.
 
constexpr ZlibOutputStreamSettings (void *buf_in_, void *buf_out_, size_t buffer_size_, int level_) noexcept
 Sets the individual data members.
 
constexpr ZlibOutputStreamSettings (void *buf_in_, void *buf_out_, size_t buffer_size_, int level_, ReallocFunc realloc_func_) noexcept
 Sets the individual data members.
 

Public Attributes

void * buf_in
 The buffer set for z_stream::next_in. More...
 
void * buf_out
 The buffer set for z_stream::next_out. More...
 
size_t buffer_size
 The size of ZlibOutputStreamSettings::buf_in and ZlibOutputStreamSettings::buf_out. More...
 
int level
 The compression setting to pass to the deflateInit2 function of zlib. More...
 
ReallocFunc realloc_func
 The realloc function or its equivalent that ZlibOutputStream uses internally. More...
 

Detailed Description

The structure that stores the various ZlibOutputStream settings. At construction time, the default settings are stored.

Examples:
misc/usezlib/usezlib.cpp.

Definition at line 28 of file ZlibOutputStream.h.

Member Data Documentation

◆ buf_in

nn::nlib::ZlibOutputStreamSettings::buf_in

The buffer set for z_stream::next_in.

Description
If NULL is specified, ZlibOutputStream acts internally to allocate a buffer. If you specify NULL, you also must specify NULL for buf_out.
The default is NULL.

Definition at line 30 of file ZlibOutputStream.h.

◆ buf_out

nn::nlib::ZlibOutputStreamSettings::buf_out

The buffer set for z_stream::next_out.

Description
If NULL is specified, ZlibOutputStream acts internally to allocate a buffer. If you specify NULL, you also must specify NULL for buf_in.
The default is NULL.

Definition at line 31 of file ZlibOutputStream.h.

◆ buffer_size

nn::nlib::ZlibOutputStreamSettings::buffer_size

The size of ZlibOutputStreamSettings::buf_in and ZlibOutputStreamSettings::buf_out.

Description
You must set this value to 1024 or greater. The default is 65536.

Definition at line 32 of file ZlibOutputStream.h.

◆ level

nn::nlib::ZlibOutputStreamSettings::level

The compression setting to pass to the deflateInit2 function of zlib.

Description
The default is Z_DEFAULT_COMPRESSION.

Definition at line 33 of file ZlibOutputStream.h.

◆ realloc_func

nn::nlib::ZlibOutputStreamSettings::realloc_func

The realloc function or its equivalent that ZlibOutputStream uses internally.

Description
The default setting is the C standard realloc function.

Definition at line 34 of file ZlibOutputStream.h.


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