OpenTTD Source: LZMALoadFilter Struct Reference

OpenTTD Source 14.0-beta3

Public Member Functions | Data Fields
LZMALoadFilter Struct Reference

Filter without any compression. More...

Inheritance diagram for LZMALoadFilter:

## Public Member Functions
| LZMALoadFilter (std::shared_ptr< LoadFilter > chain)
| Initialise this filter. More...
| ~LZMALoadFilter ()
| Clean everything up.
size_t | Read (byte *buf, size_t size) override
| Read a given number of bytes from the savegame. More...
Public Member Functions inherited from LoadFilter
| LoadFilter (std::shared_ptr< LoadFilter > chain)
| Initialise this filter. More...
virtual | ~LoadFilter ()
| Make sure the writers are properly closed.
virtual void | Reset ()
| Reset this filter to read from the beginning of the file.

## Data Fields
lzma_stream | lzma
| Stream state that we are reading from.
byte | fread_buf [MEMORY_CHUNK_SIZE]
| Buffer for reading from the file.
Data Fields inherited from LoadFilter
std::shared_ptr< LoadFilter > | chain
| Chained to the (savegame) filters.

## Detailed Description

Filter without any compression.

Definition at line 2496 of file saveload.cpp.

## Constructor & Destructor Documentation

## ◆ LZMALoadFilter()

LZMALoadFilter::LZMALoadFilter | ( | std::shared_ptr< LoadFilter > | chain | ) |
| inline

Initialise this filter.

Parameters

  chain | The next filter in this chain.

Definition at line 2504 of file saveload.cpp.

References SlError().

## Member Function Documentation

## ◆ Read()

size_t LZMALoadFilter::Read | ( | byte * | buf,
|  | size_t | len
| ) |  |
| inlineoverridevirtual

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 2516 of file saveload.cpp.

References fread_buf, and SlError().

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

- src/saveload/saveload.cpp