OpenTTD
|
Filter using LZMA compression. More...
Public Member Functions | |
LZMASaveFilter (SaveFilter *chain, byte compression_level) | |
Initialise this filter. More... | |
~LZMASaveFilter () | |
Clean up what we allocated. More... | |
void | WriteLoop (byte *p, size_t len, lzma_action action) |
Helper loop for writing the data. More... | |
void | Write (byte *buf, size_t size) |
Write a given number of bytes into the savegame. More... | |
void | Finish () |
Prepare everything to finish writing the savegame. | |
![]() | |
SaveFilter (SaveFilter *chain) | |
Initialise this filter. More... | |
virtual | ~SaveFilter () |
Make sure the writers are properly closed. More... | |
Data Fields | |
lzma_stream | lzma |
Stream state that we are writing to. | |
![]() | |
SaveFilter * | chain |
Chained to the (savegame) filters. More... | |
Filter using LZMA compression.
Definition at line 2280 of file saveload.cpp.
|
inline |
Initialise this filter.
chain | The next filter in this chain. |
compression_level | The requested level of compression. |
Definition at line 2288 of file saveload.cpp.
References SlError().
|
inline |
Clean up what we allocated.
Definition at line 2294 of file saveload.cpp.
|
inlinevirtual |
Write a given number of bytes into the savegame.
buf | The bytes to write. |
len | The number of bytes to write. |
Implements SaveFilter.
Definition at line 2326 of file saveload.cpp.
|
inline |
Helper loop for writing the data.
p | The bytes to write. |
len | Amount of bytes to write. |
action | Action for lzma_code. |
Definition at line 2305 of file saveload.cpp.
References ReadBuffer::buf, MEMORY_CHUNK_SIZE, and SlError().