MityDSP Documentation Index
Classes | Enumerations | Functions | Variables
ZLib Namespace Reference

Classes

struct  tsZLibHdr
 Gzip file header structure, see RFC 1952. More...

Enumerations

enum  teZlibErr {
  eeOK = 0, eeSTREAM_END = 1, eeNEED_DICT = 2, eeERRNO = (-1),
  eeSTREAM_ERROR = (-2), eeDATA_ERROR = (-3), eeMEM_ERROR = (-4), eeBUF_ERROR = (-5),
  eeVERSION_ERROR = (-6)
}

Functions

int Compress (unsigned char *apDest, unsigned int *apDestLen, unsigned char *apSource, unsigned int anSourceLen)
 Compress a memory mapped image to a gzip compatible output image, including the necessary header for decoding by gzip versions 1.2.3 or higher.
int UnCompress (unsigned char *apDest, unsigned int *apDestLen, unsigned char *apSource, unsigned int anSourceLen)
 UnCompresses a gzip image to a memory image.

Variables

int zlib_major = 1
 MityDSP ZLib library major version number (i.e. x in x.y.z).
int zlib_minor = 0
 MityDSP ZLib library minor version number (i.e. y in x.y.z).
int zlib_build = 0
 MityDSP ZLib library build version number (i.e. z in x.y.z).
const char * zlib_str = "MityDSP ZLib Data Compression library, v1.0.0"
 MityDSP ZLib library version as a string.
const char * zlib_date = __DATE__
 MityDSP ZLib library build date.
const char * zlib_time = __TIME__
 MityDSP ZLib library build time.
static const unsigned int GZ_HEADER_SIZE = 10

Enumeration Type Documentation

Enumerator:
eeOK 
eeSTREAM_END 
eeNEED_DICT 
eeERRNO 
eeSTREAM_ERROR 
eeDATA_ERROR 
eeMEM_ERROR 
eeBUF_ERROR 
eeVERSION_ERROR 

Function Documentation

int ZLib::Compress ( unsigned char *  apDest,
unsigned int *  apDestLen,
unsigned char *  apSource,
unsigned int  anSourceLen 
)

Compress a memory mapped image to a gzip compatible output image, including the necessary header for decoding by gzip versions 1.2.3 or higher.

Parameters:
[out]apDestoutput image buffer
[in,out]apDestLennumber of bytes available in the buffer. On return, the number of bytes used to build the compresssed image.
[in]apSourcesource data image
[in]anSourceLensource data image length
Returns:
This routine returns:
  • eeOK on success
  • eeMEM_ERROR if not enough memory is available to execute
  • eeBUF_ERROR if not enough memory is available in dest buffer
int ZLib::UnCompress ( unsigned char *  apDest,
unsigned int *  apDestLen,
unsigned char *  apSource,
unsigned int  anSourceLen 
)

UnCompresses a gzip image to a memory image.

If a gzip file header is present, it will be parsed / skipped. Otherwise a raw zlib image may be used.

Parameters:
[out]apDestoutput image buffer
[in,out]apDestLennumber of bytes available in the buffer. On return, the number of bytes used to build the compresssed image.
[in]apSourcesource data image
[in]anSourceLensource data image length
Returns:
This routine returns:
  • eeOK on success
  • eeMEM_ERROR if not enough memory is available to execute
  • eeBUF_ERROR if not enough memory is available in dest buffer
  • eeDATA_ERROR if there was a problem decoding the headers of the image
  • eeSTREAM_ERROR if there corruption of the image data stream

Variable Documentation

int ZLib::zlib_major = 1

MityDSP ZLib library major version number (i.e. x in x.y.z).

int ZLib::zlib_minor = 0

MityDSP ZLib library minor version number (i.e. y in x.y.z).

int ZLib::zlib_build = 0

MityDSP ZLib library build version number (i.e. z in x.y.z).

const char * ZLib::zlib_str = "MityDSP ZLib Data Compression library, v1.0.0"

MityDSP ZLib library version as a string.

const char * ZLib::zlib_date = __DATE__

MityDSP ZLib library build date.

const char * ZLib::zlib_time = __TIME__

MityDSP ZLib library build time.

const unsigned int ZLib::GZ_HEADER_SIZE = 10
static

  
Generated on Mon Apr 22 2013 11:33:47 for Zlib Compression Library by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.