MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ZlibSaveFilter

Method ZlibSaveFilter

src/saveload/saveload.cpp:2614–2617  ·  view source on GitHub ↗

* Initialise this filter. * @param chain The next filter in this chain. * @param compression_level The requested level of compression. */

Source from the content-addressed store, hash-verified

2612 * @param compression_level The requested level of compression.
2613 */
2614 ZlibSaveFilter(std::shared_ptr<SaveFilter> chain, uint8_t compression_level) : SaveFilter(std::move(chain))
2615 {
2616 if (deflateInit(&this->z, compression_level) != Z_OK) SlError(STR_GAME_SAVELOAD_ERROR_BROKEN_INTERNAL_ERROR, "cannot initialize compressor");
2617 }
2618
2619 /** Clean up what we allocated. */
2620 ~ZlibSaveFilter()

Callers

nothing calls this directly

Calls 1

SlErrorFunction · 0.85

Tested by

no test coverage detected