Mercurial > hg > dmlib
view src/dmzlib.h @ 970:6c33c92de066
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 27 Feb 2015 05:33:48 +0200 |
parents | 1832ac20edb2 |
children | cd0e0270e1ce |
line wrap: on
line source
/* * DMLib * -- ZLib implementation * Public domain zlib decode v0.2 by Sean Barrett 2006-11-18 * Modified and reformatted for DMLib by Matti 'ccr' Hamalainen */ #ifndef DMZLIB_H #define DMZLIB_H #include "dmlib.h" #ifdef __cplusplus extern "C" { #endif #define STBI__ZFAST_BITS 9 // accelerate all cases in default tables #define STBI__ZFAST_SIZE (1 << STBI__ZFAST_BITS) #define STBI__ZFAST_MASK (STBI__ZFAST_SIZE - 1) typedef struct { Uint16 fast[STBI__ZFAST_SIZE]; Uint16 firstCode[16]; int maxCode[17]; Uint16 firstSymbol[16]; Uint8 size[288]; Uint16 value[288]; } DMZHuffmanContext; typedef struct { Uint8 *zbuffer, *zbufferEnd; int numBits; Uint32 codeBuffer; Uint8 *zout, *zoutStart, *zoutEnd; BOOL expandable; DMZHuffmanContext zlength, zdistance; } DMZLibContext; void dmZLibInit(); int dmZLibDecode(DMZLibContext * ctx); int dmZLibParseHeader(DMZLibContext * ctx, BOOL checkPNG); #ifdef __cplusplus } #endif #endif // DMZLIB_H