WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
WXP::Zlib Class Reference

This class manages zlib decompression. More...

#include "../include/Zlib.h"

Public Types

enum  Type { COMP , DECOMP }
 

Public Member Functions

 Zlib ()
 
 Zlib (int rtype)
 
int init ()
 
int set (unsigned char *next_in, int avail_in, unsigned char *next_out, int avail_out)
 
int decomp ()
 
int decomp (Buffer &in, Buffer &out)
 
int comp (int flag)
 
int finish ()
 
int print ()
 
int getStatus ()
 
int getAvailIn ()
 
int getAvailOut ()
 
int getTotalOut ()
 
bool isError ()
 

Static Public Attributes

static int const STREAM_END = Z_STREAM_END
 
static int const NEED_DICT = Z_NEED_DICT
 
static int const OK = Z_OK
 
static int const FINISH = Z_FINISH
 

Detailed Description

This class manages zlib decompression.

Author
Dan Vietor

Member Enumeration Documentation

◆ Type

File type

Enumerator
COMP 

Compress data

DECOMP 

Decompress data

Constructor & Destructor Documentation

◆ Zlib() [1/2]

Zlib::Zlib ( )

Constructor - initializes date, sets up for decompression

References DECOMP, init(), and OK.

◆ Zlib() [2/2]

Zlib::Zlib ( int  rtype)

Constructor - initializes data

Parameters
rtypeProcessing type (COMP or DECOMP )

References init(), and OK.

Member Function Documentation

◆ comp()

int Zlib::comp ( int  flag)

Compresses the data

Parameters
flagThe compression output flag

References DECOMP.

Referenced by WXP::ImgWxpFile::write().

◆ decomp() [1/2]

int Zlib::decomp ( )

Decompress the data from parameter entered in set()

References COMP.

Referenced by WXP::GiniFile::readData(), WXP::ImgWxpFile::readData(), and WXP::GiniFile::readHeader().

◆ decomp() [2/2]

int Zlib::decomp ( Buffer in,
Buffer out 
)

Decompress the data

Parameters
inThe input buffer
outThe output buffer

References COMP.

◆ finish()

int Zlib::finish ( )

End compression of data

References DECOMP.

Referenced by WXP::GiniFile::readData(), WXP::ImgWxpFile::readData(), and WXP::ImgWxpFile::write().

◆ getAvailIn()

int WXP::Zlib::getAvailIn ( )
inline

Returns available bytes not processed

Referenced by WXP::ImgWxpFile::readData().

◆ getAvailOut()

int WXP::Zlib::getAvailOut ( )
inline

Returns available bytes out

Referenced by WXP::ImgWxpFile::readData().

◆ getStatus()

int WXP::Zlib::getStatus ( )
inline

Returns status

Referenced by WXP::GiniFile::readData().

◆ getTotalOut()

int WXP::Zlib::getTotalOut ( )
inline

Returns total bytes output

Referenced by WXP::ImgWxpFile::write().

◆ init()

int Zlib::init ( )

◆ isError()

bool WXP::Zlib::isError ( )
inline

Returns if there was an error

Referenced by WXP::GiniFile::readData(), and WXP::ImgWxpFile::readData().

◆ print()

int Zlib::print ( )

◆ set()

int Zlib::set ( unsigned char *  next_in,
int  avail_in,
unsigned char *  next_out,
int  avail_out 
)

Sets the data parameters

Parameters
next_inPointer to next input data
avail_inAmount of bytes available to process
next_outPointer to output buffer
avail_outAvailable space in output buffer

Referenced by WXP::ImgWxpFile::readData(), and WXP::ImgWxpFile::write().

Member Data Documentation

◆ FINISH

int const WXP::Zlib::FINISH = Z_FINISH
static

Finish compression of data

Referenced by WXP::ImgWxpFile::write().

◆ NEED_DICT

int const WXP::Zlib::NEED_DICT = Z_NEED_DICT
static

Need dictionary error

◆ OK

int const WXP::Zlib::OK = Z_OK
static

No error in processing

Referenced by Zlib(), and Zlib().

◆ STREAM_END

int const WXP::Zlib::STREAM_END = Z_STREAM_END
static

End of stream status

Referenced by WXP::GiniFile::readData().


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