Header Header

gxzlib.h File Reference


Detailed Description

Compression handling interface

The GX is the base system for the majority of the Adaptive Recognition products. It is a collection of loadable modules and library functions and gives an easy to program interface to the hardware devices.

This file contains the descriptions of classes and functions of the compression handling module.

Go to the source code of this file.

Enumerations

enum  GX_ZLEVELS {
  GX_Z_NO_COMPRESSION = 0,
  GX_Z_BEST_SPEED = 1,
  GX_Z_BEST_COMPRESSION = 9,
  GX_Z_DEFAULT_COMPRESSION = -1
}
 Compression levels (0-9). More...
enum  GX_ZSTRATEGIES {
  GX_Z_FILTERED = 1,
  GX_Z_HUFFMAN_ONLY = 2,
  GX_Z_RLE = 3,
  GX_Z_FIXED = 4,
  GX_Z_DEFAULT_STRATEGY = 0
}
 Compression strategies. More...
enum  GX_ZMETHODS { GX_Z_DEFLATED = 8 }
 Compression methods. More...
enum  GX_CREATEZIPMODES {
  GX_ZIP_CREATE = 0,
  GX_ZIP_CREATEAFTER,
  GX_ZIP_ADDINZIP
}
 Create modes for gx_createzip() function. More...

Functions

static int gx_gzcompress (gxHANDLE handle, void *target, int *tgtlen, const void *source, int srclen, int level)
 Compresses a memory area.
static int gx_gzcompressd (void *target, int *tgtlen, const void *source, int srclen, int level)
 Compresses a memory area.
static int gx_gzuncompress (gxHANDLE handle, void *target, int *tgtlen, const void *source, int srclen)
 Decompresses a compressed data from memory.
static int gx_gzuncompressd (void *target, int *tgtlen, const void *source, int srclen)
 Decompresses a compressed data from memory.
static int gx_creategz (gxHANDLE handle, const wchar_t *filename, int level, int strategy)
 Creates a .gz file (Unicode version).
static int gx_creategza (gxHANDLE handle, const char *filename, int level, int strategy)
 Creates a .gz file (ASCII version).
static int gx_opengz (gxHANDLE handle, const wchar_t *filename)
 Opens the .gz file (Unicode version).
static int gx_opengza (gxHANDLE handle, const char *filename)
 Opens the .gz file (ASCII version).
static int gx_closegz (gxHANDLE handle)
 Closes an opened or created .gz file.
static int gx_readgz (gxHANDLE handle, void *buffer, int *buflen)
 Reads data from an opened .gz file.
static int gx_writegz (gxHANDLE handle, const void *buffer, int buflen)
 Writes data to a created .gz file.
static int gx_createzip (gxHANDLE handle, const wchar_t *filename, int mode)
 Creates a ZIP file (Unicode version).
static int gx_createzipa (gxHANDLE handle, const char *filename, int mode)
 Creates a ZIP file (ASCII version).
static int gx_openzip (gxHANDLE handle, const wchar_t *filename)
 Opens a ZIP file (Unicode version).
static int gx_openzipa (gxHANDLE handle, const char *filename)
 Opens a ZIP file (ASCII version).
static int gx_createzipinmemory (gxHANDLE handle, int mode)
 Creates a ZIP file in memory.
static int gx_getzipinmemory (gxHANDLE handle, void **pbuffer, int *pbuflen)
 Get the created ZIP file in memory.
static int gx_openzipinmemory (gxHANDLE handle, void *buffer, int buflen)
 Opens a ZIP file in memory.
static int gx_closezip (gxHANDLE handle, const wchar_t *comment)
 It closes an opened/created ZIP file (Unicode version).
static int gx_closezipa (gxHANDLE handle, const char *comment)
 It closes an opened/created ZIP file (ASCII version).
static int gx_getzipinfo (gxHANDLE handle, struct GX_PARM_GETZIPINFO *info)
 Gives informations about the opened ZIP file.
static int gx_getzipcomment (gxHANDLE handle, wchar_t *target, int *tlen)
 Reads the comment from the archive (Unicode version).
static int gx_getzipcommenta (gxHANDLE handle, char *target, int *tlen)
 Reads the comment from the archive (ASCII version).
static int gx_createfileinzip (gxHANDLE handle, struct GX_PARM_CREATEFILEINZIPW *cfz)
 Creates a file in the archive (Unicode version).
static int gx_createfileinzipa (gxHANDLE handle, struct GX_PARM_CREATEFILEINZIP *cfz)
 Creates a file in the archive (ASCII version).
static int gx_writetofileinzip (gxHANDLE handle, const void *buffer, int buflen)
 Writes data to the current file in the archive.
static int gx_closefileinzip (gxHANDLE handle)
 Closes the current file in the archive.
static int gx_firstfileinzip (gxHANDLE handle, GX_ZIPFILEDETINFOW *finfo)
 Sets marker to the first file in the archive (Unicode version).
static int gx_firstfileinzipa (gxHANDLE handle, GX_ZIPFILEDETINFO *finfo)
 Sets marker to the first file in the archive.
static int gx_nextfileinzip (gxHANDLE handle, GX_ZIPFILEDETINFOW *finfo)
 Sets marker to the next file in the archive (Unicode version).
static int gx_nextfileinzipa (gxHANDLE handle, GX_ZIPFILEDETINFO *finfo)
 Sets marker to the next file in the archive.
static int gx_locatefileinzip (gxHANDLE handle, GX_ZIPFILEDETINFOW *finfo, const wchar_t *filename, int casesensitivity)
 Sets marker to the specified file in the archive (Unicode version).
static int gx_locatefileinzipa (gxHANDLE handle, GX_ZIPFILEDETINFO *finfo, const char *filename, int casesensitivity)
 Sets marker to the specified file in the archive (ASCII version).
static int gx_fileinfoinzip (gxHANDLE handle, GX_ZIPFILEDETINFOW *finfo)
 Gives information about a marked file in the archive (Unicode version).
static int gx_fileinfoinzipa (gxHANDLE handle, GX_ZIPFILEDETINFO *finfo)
 Gives information about a marked file in the archive (ASCII version).
static int gx_openfileinzip (gxHANDLE handle, int *method, int *level, const wchar_t *password)
 Opens a marked file in the archive (Unicode version).
static int gx_openfileinzipa (gxHANDLE handle, int *method, int *level, const char *password)
 Opens a marked file in the archive.
static int gx_readfromfileinzip (gxHANDLE handle, void *target, int *tlen)
 It reads a content from a marked file in the archive.
static int gx_calculatezipcrc (gxHANDLE handle, unsigned int *crc, const void *buffer, int buflen)
 Calculates CRC-32 value from the specified buffer.
static int gx_calculatezipcrcd (unsigned int *crc, const void *buffer, int buflen)
 Calculates CRC-32 value from the specified buffer.
static int gx_getinitialzipcrc (gxHANDLE handle, unsigned int *crc)
 Returns the initial CRC.
static int gx_getinitialzipcrcd (unsigned int *crc)
 Returns the initial CRC.
static int gx_readlexfieldzip (gxHANDLE handle, void *buffer, int *buflen)
 Reads the local extra field of the marked file in the archive.


Enumeration Type Documentation

enum GX_ZLEVELS

Compression levels (0-9).

Enumerator:
GX_Z_NO_COMPRESSION  No compression (0).

GX_Z_BEST_SPEED  Best speed (1).

GX_Z_BEST_COMPRESSION  Best compression (9).

GX_Z_DEFAULT_COMPRESSION  Default compression level.

Compression strategies.

Enumerator:
GX_Z_FILTERED  Force more Huffman coding and less string matching.

GX_Z_HUFFMAN_ONLY  Force Huffman encoding only (no string match).

GX_Z_RLE  RLE is fast as Huffman, but give better compression for PNG image data.

GX_Z_FIXED  Prevents the use of dynamic Huffman codes, allowing for a simpler decoder.

GX_Z_DEFAULT_STRATEGY  Use for normal data.

Compression methods.

Enumerator:
GX_Z_DEFLATED  The deflate compression method (the only one supported).

Create modes for gx_createzip() function.

Enumerator:
GX_ZIP_CREATE  Create a new ZIP file.

GX_ZIP_CREATEAFTER  The ZIP will be created at the end of the file.

GX_ZIP_ADDINZIP  Add files to an existing archive.


Generated  for GX
(c) Adaptive Recognition