ofxDepthStream
Public Member Functions | Protected Member Functions
depth::Inflater Class Reference

Inflates ("decompresses") a package ("frame") of data compressed using zlib doCompression. More...

#include <Inflater.h>

Public Member Functions

 ~Inflater ()
 Deallocates the memory used to store inflated content (will not deallocate the memory that was release using the releaseData method) More...
 
void destroy ()
 Deallocates the memory used to store inflated content (will not deallocate the memory that was release using the releaseData method) More...
 
bool inflate (const void *data, size_t size)
 Performs decompression on the provided data package. More...
 
size_t getSize () const
 Returns the inflated size of the last inflate operation. More...
 
const void * getData () const
 Returns a pointer to the inflated package data (will be NULL when no inflation is performed or after releaseData is called) More...
 
void * releaseData ()
 "Releases" (abandons) and returns a pointer to the allocated data for decompression. More...
 
size_t getFailCount () const
 Returns the number of times this instance failed to succesfully inflate a package. More...
 

Protected Member Functions

void growTo (size_t to)
 
const void * decompress (const void *compressedBytes, unsigned int length)
 
std::ostream & cout ()
 
std::ostream & cerr ()
 

Detailed Description

Inflates ("decompresses") a package ("frame") of data compressed using zlib doCompression.

Constructor & Destructor Documentation

◆ ~Inflater()

depth::Inflater::~Inflater ( )
inline

Deallocates the memory used to store inflated content (will not deallocate the memory that was release using the releaseData method)

Member Function Documentation

◆ cerr()

std::ostream& depth::Inflater::cerr ( )
inlineprotected

◆ cout()

std::ostream& depth::Inflater::cout ( )
inlineprotected

◆ decompress()

const void * Inflater::decompress ( const void *  compressedBytes,
unsigned int  length 
)
protected

◆ destroy()

void Inflater::destroy ( )

Deallocates the memory used to store inflated content (will not deallocate the memory that was release using the releaseData method)

Referenced by ~Inflater().

◆ getData()

const void* depth::Inflater::getData ( ) const
inline

Returns a pointer to the inflated package data (will be NULL when no inflation is performed or after releaseData is called)

Referenced by depth::inflate().

◆ getFailCount()

size_t depth::Inflater::getFailCount ( ) const
inline

Returns the number of times this instance failed to succesfully inflate a package.

◆ getSize()

size_t depth::Inflater::getSize ( ) const
inline

Returns the inflated size of the last inflate operation.

Referenced by depth::inflate().

◆ growTo()

void Inflater::growTo ( size_t  to)
protected

◆ inflate()

bool Inflater::inflate ( const void *  data,
size_t  size 
)

Performs decompression on the provided data package.

Referenced by depth::inflate().

◆ releaseData()

void* depth::Inflater::releaseData ( )
inline

"Releases" (abandons) and returns a pointer to the allocated data for decompression.

When using this method, the caller is responsible for deallocating the returned memory block


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