GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_io_zlib.h File Reference

Zlib decompression stream. More...

#include <loaders/gp_io.h>

Go to the source code of this file.

Functions

gp_iogp_io_zlib (gp_io *io, size_t comp_size)
 Create a Zlib RAW inflate stream on the top of the existing I/O stream.
 
int gp_io_zlib_reset (gp_io *io, gp_io *sub_io, size_t comp_size)
 Repurposes existing Zlib stream for new decompression.
 

Detailed Description

Zlib decompression stream.

Definition in file gp_io_zlib.h.

Function Documentation

◆ gp_io_zlib()

gp_io * gp_io_zlib ( gp_io * io,
size_t comp_size )

Create a Zlib RAW inflate stream on the top of the existing I/O stream.

The stream will read up to comp_size bytes from the parent I/O.

If comp_size is 0, no limit on number bytes from the parent stream is set. However if end of compressed stream is reached the last read will attempt to seek back by the number of extra buffered bytes.

◆ gp_io_zlib_reset()

int gp_io_zlib_reset ( gp_io * io,
gp_io * sub_io,
size_t comp_size )

Repurposes existing Zlib stream for new decompression.

Returns
Zero on success. Returns non-zero on failure and errno is set.