* Initialise this filter. * @param chain The next filter in this chain. * @param compression_level The requested level of compression. */
| 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() |