Public Member Functions | Data Fields

# ZlibLoadFilter Struct Reference

Filter using Zlib compression. More...

Inheritance diagram for ZlibLoadFilter:

## Public Member Functions
| ZlibLoadFilter (LoadFilter *chain)
| Initialise this filter.
| ~ZlibLoadFilter ()
| Clean everything up.
size_t | Read (byte *buf, size_t size)
| Read a given number of bytes from the savegame.
## Data Fields
z_stream | z
| Stream state we are reading from.
byte | fread_buf [MEMORY_CHUNK_SIZE]
| Buffer for reading from the file.

## Detailed Description

Filter using Zlib compression.

Definition at line 2006 of file saveload.cpp.

## Constructor & Destructor Documentation

ZlibLoadFilter::ZlibLoadFilter | ( | LoadFilter * | chain | ) | `[inline]`

Initialise this filter.

Parameters:

  | chain | The next filter in this chain.

Definition at line 2014 of file saveload.cpp.

References SlError(), and z.

ZlibLoadFilter::~ZlibLoadFilter | ( |  | ) | `[inline]`

Clean everything up.

Definition at line 2021 of file saveload.cpp.

References z.

## Member Function Documentation

size_t ZlibLoadFilter::Read | ( | byte * | buf,
|  | size_t | len |
| ) |  |  | `[inline, virtual]`

Read a given number of bytes from the savegame.

Parameters:

  | buf | The bytes to read.
  | len | The number of bytes to read.

Returns:
  The number of actually read bytes.

Implements LoadFilter.

Definition at line 2026 of file saveload.cpp.

References LoadFilter::chain, fread_buf, LoadFilter::Read(), SlError(), and z.

The documentation for this struct was generated from the following file:

- src/saveload/saveload.cpp