OpenTTD Source 20241224-master-gf74b0cf984
LZOLoadFilter Struct Reference

Filter using LZO compression. More...

Inheritance diagram for LZOLoadFilter:
LoadFilter

Public Member Functions

 LZOLoadFilter (std::shared_ptr< LoadFilter > chain)
 Initialise this filter.
 
size_t Read (uint8_t *buf, size_t ssize) override
 Read a given number of bytes from the savegame.
 
- Public Member Functions inherited from LoadFilter
 LoadFilter (std::shared_ptr< LoadFilter > chain)
 Initialise this filter.
 
virtual ~LoadFilter ()=default
 Make sure the writers are properly closed.
 
virtual void Reset ()
 Reset this filter to read from the beginning of the file.
 

Additional Inherited Members

- Data Fields inherited from LoadFilter
std::shared_ptr< LoadFilterchain
 Chained to the (savegame) filters.
 

Detailed Description

Filter using LZO compression.

Definition at line 2325 of file saveload.cpp.

Constructor & Destructor Documentation

◆ LZOLoadFilter()

LZOLoadFilter::LZOLoadFilter ( std::shared_ptr< LoadFilter chain)
inline

Initialise this filter.

Parameters
chainThe next filter in this chain.

Definition at line 2330 of file saveload.cpp.

References SlError().

Member Function Documentation

◆ Read()

size_t LZOLoadFilter::Read ( uint8_t *  buf,
size_t  len 
)
inlineoverridevirtual

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

References _sl_version, LoadFilter::chain, LZO_BUFFER_SIZE, SL_MIN_VERSION, SlError(), and SlErrorCorrupt().


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