png_set_compression_mem_level

Name

png_set_compression_mem_level -- set how much memory to use for the internal state during PNG compression

Synopsis

#include <png.h>

void png_set_compression_mem_level(png_structp png_ptr, int mem_level);

Description

This interface shall set how much memory to use for the internal state during PNG compression.

The parameter png_ptr shall specify the PNG file to compress.

The parameter mem_level corresponds directly to the memLevel parameter of the libz deflateInit2_() interface. This parameter shall specify how much memory to use for the internal state. The value of mem_level must be between 1 and MAX_MEM_LEVEL. Smaller values use less memory but are slower, while higher values use more memory to gain compression speed.