51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef SERIALIZATION_HEADER
-#define SERIALIZATION_HEADER
+#pragma once
#include "irrlichttypes.h"
#include "exceptions.h"
25: Improved node timer format
26: Never written; read the same as 25
27: Added light spreading flags to blocks
+ 28: Added "private" flag to NodeMetadata
*/
// This represents an uninitialized or invalid format
#define SER_FMT_VER_INVALID 255
// Highest supported serialization version
-#define SER_FMT_VER_HIGHEST_READ 27
+#define SER_FMT_VER_HIGHEST_READ 28
// Saved on disk version
-#define SER_FMT_VER_HIGHEST_WRITE 27
+#define SER_FMT_VER_HIGHEST_WRITE 28
// Lowest supported serialization version
#define SER_FMT_VER_LOWEST_READ 0
// Lowest serialization version for writing
Misc. serialization functions
*/
-void compressZlib(SharedBuffer<u8> data, std::ostream &os, int level = -1);
+void compressZlib(const u8 *data, size_t data_size, std::ostream &os, int level = -1);
void compressZlib(const std::string &data, std::ostream &os, int level = -1);
-void decompressZlib(std::istream &is, std::ostream &os);
+void decompressZlib(std::istream &is, std::ostream &os, size_t limit = 0);
// These choose between zlib and a self-made one according to version
-void compress(SharedBuffer<u8> data, std::ostream &os, u8 version);
+void compress(const SharedBuffer<u8> &data, std::ostream &os, u8 version);
//void compress(const std::string &data, std::ostream &os, u8 version);
void decompress(std::istream &is, std::ostream &os, u8 version);
-
-#endif
-