OpenTTD
Public Member Functions | Data Fields
LZMALoadFilter Struct Reference

Filter without any compression. More...

Inheritance diagram for LZMALoadFilter:
LoadFilter

Public Member Functions

 LZMALoadFilter (LoadFilter *chain)
 Initialise this filter.
 ~LZMALoadFilter ()
 Clean everything up.
size_t Read (byte *buf, size_t size)
 Read a given number of bytes from the savegame.
- Public Member Functions inherited from LoadFilter
 LoadFilter (LoadFilter *chain)
 Initialise this filter.
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
LoadFilterchain
 Chained to the (savegame) filters.

Detailed Description

Filter without any compression.

Definition at line 2228 of file saveload.cpp.

Constructor & Destructor Documentation

LZMALoadFilter::LZMALoadFilter ( LoadFilter chain)
inline

Initialise this filter.

Parameters
chainThe next filter in this chain.

Definition at line 2236 of file saveload.cpp.

References lzma, and SlError().

LZMALoadFilter::~LZMALoadFilter ( )
inline

Clean everything up.

Definition at line 2243 of file saveload.cpp.

References lzma.

Member Function Documentation

size_t LZMALoadFilter::Read ( byte *  buf,
size_t  len 
)
inlinevirtual

Read a given number of bytes from the savegame.

Parameters
bufThe bytes to read.
lenThe number of bytes to read.
Returns
The number of actually read bytes.

Implements LoadFilter.

Definition at line 2248 of file saveload.cpp.

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


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