LodePNG Namespace Reference


Classes

struct  Info
struct  InfoPng
struct  InfoRaw
class  Decoder
class  Encoder
class  HuffmanTree
class  Crc32
class  Adler32
class  Inflator
class  ZlibUncompressor
class  Deflator
class  ZlibCompressor

Functions

void loadFile (std::vector< unsigned char > &buffer, const std::string &filename)
void saveFile (const std::vector< unsigned char > &buffer, const std::string &filename)
void addBitToStream (size_t &bitpointer, std::vector< unsigned char > &bitstream, unsigned long bit)
void addBitsToStream (size_t &bitpointer, std::vector< unsigned char > &bitstream, unsigned long value, size_t nbits)
void addBitsToStreamReversed (size_t &bitpointer, std::vector< unsigned char > &bitstream, unsigned long value, size_t nbits)
void setBitOfStream (size_t &bitpointer, unsigned char *bitstream, unsigned long bit)
void setBitOfReversedStream (size_t &bitpointer, unsigned char *bitstream, unsigned long bit)
unsigned long readBitFromStream (size_t &bitpointer, const unsigned char *bitstream)
unsigned long readBitFromReversedStream (size_t &bitpointer, const unsigned char *bitstream)
unsigned long readBitsFromStream (size_t &bitpointer, const unsigned char *bitstream, int nbits)
unsigned long readBitsFromReversedStream (size_t &bitpointer, const unsigned char *bitstream, int nbits)
unsigned long read32bitInt (const unsigned char *buffer)
void add32bitInt (std::vector< unsigned char > &buffer, unsigned long value)
signed long paethPredictor (signed long a, signed long b, signed long c)
int generateFixedTree (HuffmanTree &tree)
int generateDistanceTree (HuffmanTree &tree)
bool operator== (const Info &info1, const Info &info2)
bool operator!= (const Info &info1, const Info &info2)
int convert (std::vector< unsigned char > &out, const unsigned char *in, Info &infoOut, Info &infoIn, unsigned long w, unsigned long h)
int checkColorValidity (unsigned long colorType, unsigned long bitDepth)
unsigned long getNumColorChannels (unsigned long colorType, unsigned long)
unsigned long getBpp (unsigned long colorType, unsigned long bitDepth)
void addHuffmanSymbol (size_t &bp, std::vector< unsigned char > &compressed, unsigned long code, unsigned long bitlen)
size_t searchCodeIndex (const long unsigned *array, size_t array_size, size_t value)
void addLengthDistance (std::vector< int > &values, size_t length, size_t distance)
void encodeLZ77_brute (std::vector< int > &out, const unsigned char *in, size_t size, unsigned long windowSize)
unsigned int getHash (const unsigned char *data, size_t size, size_t pos)
void encodeLZ77 (std::vector< int > &out, const unsigned char *in, size_t size, unsigned long windowSize)
bool isPaletteFullyOpaque (const unsigned char *palette, size_t palette_size)
bool isFullyOpaque (const unsigned char *image, unsigned long w, unsigned long h, const Info &info)

Variables

const size_t FIRST_LENGTH_CODE_INDEX = 257
const size_t LAST_LENGTH_CODE_INDEX = 285
const size_t NUM_DEFLATE_CODE_SYMBOLS = 288
const size_t NUM_DISTANCE_SYMBOLS = 32
const size_t NUM_CODE_LENGTH_CODES = 19
static const unsigned long lengthbase [29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}
static const unsigned long lengthextra [29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0}
static const unsigned long distancebase [30] = {1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}
static const unsigned long distanceextra [30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}
static const unsigned long clcl [NUM_CODE_LENGTH_CODES] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}
Crc32 crc32
Adler32 adler32
const size_t MAX_SUPPORTED_DEFLATE_LENGTH = 258


Function Documentation

void LodePNG::add32bitInt ( std::vector< unsigned char > &  buffer,
unsigned long  value 
)

void LodePNG::addBitsToStream ( size_t &  bitpointer,
std::vector< unsigned char > &  bitstream,
unsigned long  value,
size_t  nbits 
)

void LodePNG::addBitsToStreamReversed ( size_t &  bitpointer,
std::vector< unsigned char > &  bitstream,
unsigned long  value,
size_t  nbits 
)

void LodePNG::addBitToStream ( size_t &  bitpointer,
std::vector< unsigned char > &  bitstream,
unsigned long  bit 
)

void LodePNG::addHuffmanSymbol ( size_t &  bp,
std::vector< unsigned char > &  compressed,
unsigned long  code,
unsigned long  bitlen 
)

Here is the call graph for this function:

void LodePNG::addLengthDistance ( std::vector< int > &  values,
size_t  length,
size_t  distance 
)

Here is the call graph for this function:

int LodePNG::checkColorValidity ( unsigned long  colorType,
unsigned long  bitDepth 
)

int LodePNG::convert ( std::vector< unsigned char > &  out,
const unsigned char *  in,
Info &  infoOut,
Info &  infoIn,
unsigned long  w,
unsigned long  h 
)

Here is the call graph for this function:

void LodePNG::encodeLZ77 ( std::vector< int > &  out,
const unsigned char *  in,
size_t  size,
unsigned long  windowSize 
)

generate hash table

search for the longest string

encode it as length/distance pair or literal value

Here is the call graph for this function:

void LodePNG::encodeLZ77_brute ( std::vector< int > &  out,
const unsigned char *  in,
size_t  size,
unsigned long  windowSize 
)

search for the longest string

encode it as length/distance pair or literal value

Here is the call graph for this function:

int LodePNG::generateDistanceTree ( HuffmanTree &  tree  ) 

Here is the call graph for this function:

int LodePNG::generateFixedTree ( HuffmanTree &  tree  ) 

Here is the call graph for this function:

unsigned long LodePNG::getBpp ( unsigned long  colorType,
unsigned long  bitDepth 
)

Here is the call graph for this function:

unsigned int LodePNG::getHash ( const unsigned char *  data,
size_t  size,
size_t  pos 
)

unsigned long LodePNG::getNumColorChannels ( unsigned long  colorType,
unsigned  long 
)

bool LodePNG::isFullyOpaque ( const unsigned char *  image,
unsigned long  w,
unsigned long  h,
const Info &  info 
)

Here is the call graph for this function:

bool LodePNG::isPaletteFullyOpaque ( const unsigned char *  palette,
size_t  palette_size 
)

void LodePNG::loadFile ( std::vector< unsigned char > &  buffer,
const std::string &  filename 
)

bool LodePNG::operator!= ( const Info &  info1,
const Info &  info2 
)

bool LodePNG::operator== ( const Info &  info1,
const Info &  info2 
)

signed long LodePNG::paethPredictor ( signed long  a,
signed long  b,
signed long  c 
)

unsigned long LodePNG::read32bitInt ( const unsigned char *  buffer  ) 

unsigned long LodePNG::readBitFromReversedStream ( size_t &  bitpointer,
const unsigned char *  bitstream 
)

unsigned long LodePNG::readBitFromStream ( size_t &  bitpointer,
const unsigned char *  bitstream 
)

unsigned long LodePNG::readBitsFromReversedStream ( size_t &  bitpointer,
const unsigned char *  bitstream,
int  nbits 
)

Here is the call graph for this function:

unsigned long LodePNG::readBitsFromStream ( size_t &  bitpointer,
const unsigned char *  bitstream,
int  nbits 
)

Here is the call graph for this function:

void LodePNG::saveFile ( const std::vector< unsigned char > &  buffer,
const std::string &  filename 
)

size_t LodePNG::searchCodeIndex ( const long unsigned *  array,
size_t  array_size,
size_t  value 
)

void LodePNG::setBitOfReversedStream ( size_t &  bitpointer,
unsigned char *  bitstream,
unsigned long  bit 
)

void LodePNG::setBitOfStream ( size_t &  bitpointer,
unsigned char *  bitstream,
unsigned long  bit 
)


Variable Documentation

const unsigned long LodePNG::clcl[NUM_CODE_LENGTH_CODES] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15} [static]

const unsigned long LodePNG::distancebase[30] = {1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577} [static]

const unsigned long LodePNG::distanceextra[30] = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13} [static]

const size_t LodePNG::LAST_LENGTH_CODE_INDEX = 285

const unsigned long LodePNG::lengthbase[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258} [static]

const unsigned long LodePNG::lengthextra[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0} [static]

const size_t LodePNG::NUM_CODE_LENGTH_CODES = 19

const size_t LodePNG::NUM_DISTANCE_SYMBOLS = 32


Generated on Thu Mar 19 19:36:22 2009 for CubicVR by  doxygen 1.5.6