S60 Open C
libz API Specification

libz API Specification

Table of Contents

API Description
Compression Functions

 


API Description

This chapter lists information about functions which act as interface functions to Compression Library.

 


Compression Functions

This section lists functions of compression category.

Interface functions

Function

Description

adler32 Computes a running Adler-32 checksum.
compress2 Compresses data at a specified level.
compress Attempts to compress source Len bytes of data in the buffer source, placing the result in the buffer dest.
compressbound Estimates the size of buffer required to compress sourceLen bytes of data using the compress() or compress2() functions.
crc32 Computes a running Cyclic Redundancy Check checksum.
deflate Attempts to compress data until either the input buffer is empty or the output buffer is full.
deflatebound Estimates the size of buffer required to compress sourceLen bytes of data.
deflatecopy Copies the compression state information in source to the uninitialized z_stream structure referenced by dest.
deflateend Frees all allocated state information referenced by stream.
deflateinit2 Initializes the compression system.
deflateinit Initializes the compression system.
deflateparams Alters the compression parameters for the compression stream object stream.
deflatereset Resets all state associated with stream.
deflatesetdictionary Initializes the compression dictionary associated with stream using the dictlen bytes referenced by dictionary.
get-crc-table Generates tables for a byte-wise 32-bit CRC calculation based on the polynomial.
gzclose Closes the compressed file stream file.
gzdopen Attempts to associate the open file referenced by fd with a gzFile object.
gzeof Tests the compressed file stream file for end of file.
gzerror Returns a string describing the last error occurred, associated with the open compressed file stream referred to by file.
gzflush The gzflush() function shall flush pending output to the compressed file stream identified by file, which must be open for writing.
gzgetc Reads the next single character from the compressed file stream referenced by file.
gzgets Reads a string from a compressed file.
gzopen Opens the compressed file named by path.
gzprintf Formats and compresses the data.
gzputc Writes character to a compressed file.
gzputs Writes to a compressed file.
gzread Reads from a compressed file.
gzrewind Resets the file-position on a compressed file stream.
gzseek Sets the file-position indicator for the compressed file stream file.
gzsetparams Sets the compression level and compression strategy on the compressed file stream referenced by file.
gztell Returns the starting position for the next read or write operation on compressed file stream file.
gzwrite Writes data to the compressed file referenced by file, opened in a write mode.
inflate Attempts to decompress data until either the input buffer is empty or the output buffer is full.
inflateend Frees all allocated state information referenced by stream.
inflateinit2 Initializes the decompression system.
inflateinit Initializes the decompression system.
inflatereset Resets all state associated with stream.
inflatesetdictionary Initializes the decompression dictionary.
inflatesync Advances compression stream to next sync point.
inflatesyncpoint Tests for synchronization point.
uncompress Uncompresses the data.
zerror Translates error number to string.
zlibversion Locates library version at run time.

Give feedback of this article


©Nokia 2007

Back to top


This material, including documentation and any related computer programs, is protected by copyright controlled by Nokia. All rights are reserved. Copying, including reproducing, storing, adapting or translating, any or all of this material requires the prior written consent of Nokia. This material also contains confidential information, which may not be disclosed to others without the prior written consent of Nokia.

Nokia is a registered trademark of Nokia Corporation. S60 and logo is a trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. Other company and product names mentioned herein may be trademarks or tradenames of their respective owners.