minetest.compress

Description
Returns compressed_data. Supported compression methods:
 * Compress a string of data.
 * `method` is a string identifying the compression method to be used.
 * 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.