minetest.compress(data, method, ...)
- Compress a string of data.
- `method` is a string identifying the compression method to be used.
Supported compression methods:
- Deflate (zlib): "deflate"
- `...` indicates method-specific arguments. Currently defined arguments are:
- Deflate: `level` - Compression level, 0-9 or nil.
You can use this function when saving custom files to disk for reduced disk usage. Since it's compressing, you can decide to use minetest.serialize without worrying about all those redundant whitespaces. Do not use minetest.compress for meta because metadata, entity information, etc. are all already compressed in the map and manually interleaved compression is inefficient.
This article is incomplete.
This article is missing examples, feel free to add them.