zlib

Overview

This is a description of the zlib included in the CTR-SDK as well as a description of how to use zlib.

About zlib

zlib is an open-source library for compressing and decompressing data using the deflate algorithm. It is distributed from http://www.zlib.net/.

The zlib included in the CTR-SDK

The CTR-SDK uses a version of zlib, 1.2.7, modified to be compatible with the CTR-SDK.

The modified areas are listed below.

All files that begin with gz are excluded from compilations.

Using zlib

The zlib included in the CTR-SDK can be used in the following two ways.

Using via the cx Library

The following functions in the cx library use zlib internally. You can easily use zlib by using these functions.

To use these functions, you need to include the nn/cx.h file.

Directly using the zlib API

For those who understand the zlib API, you can use the original zlib API. However, gzip file access functions cannot be used.

To prevent conflicts with a zlib that may have been prepared for an application, the existing zlib API is not enabled for use by default.
For this reason, to use the zlib API you must include the zlib.h file in the source code and then add either libzlib.fast.a or libzlib.small.a to the link targets.

When using the SDK build system, add libzlib to the LIBS variable with OMakefile.

LIBS        +=   libzlib

Revision History

2012/05/25
Initial version.

CONFIDENTIAL