X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fserialization.h;h=c7cafc5d19306e60a87ed86acb8417a9e420ba9c;hb=d4d49ee8f4d425e7a4136d65f519728869680951;hp=c15a2a2354eeaf6f134be3a8cbe62b6619e8e6d2;hpb=3ac2abb0b5f84819abe6feea9d7b883b40369610;p=dragonfireclient.git diff --git a/src/serialization.h b/src/serialization.h index c15a2a235..c7cafc5d1 100644 --- a/src/serialization.h +++ b/src/serialization.h @@ -29,7 +29,7 @@ with this program; if not, write to the Free Software Foundation, Inc., NOTE: The goal is to increment this so that saved maps will be loadable by any version. Other compatibility is not maintained. - Serialization format versions: + Serialization format versions (for raw map data (blocks, nodes, sectors)): == Unsupported == 0: original networked test with 1-byte nodes 1: update with 2-byte nodes @@ -43,18 +43,28 @@ with this program; if not, write to the Free Software Foundation, Inc., 8: (dev) server-initiated block transfers and all kinds of stuff 9: (dev) block objects 10: (dev) water pressure - 11: (dev) zlib'd blocks + 11: (dev) zlib'd blocks, block flags + 12: (dev) UnlimitedHeightmap now uses interpolated areas + 13: (dev) Mapgen v2 + 14: (dev) NodeMetadata + 15: (dev) StaticObjects + 16: (dev) larger maximum size of node metadata, and compression */ // This represents an uninitialized or invalid format #define SER_FMT_VER_INVALID 255 // Highest supported serialization version -#define SER_FMT_VER_HIGHEST 11 +#define SER_FMT_VER_HIGHEST 16 // Lowest supported serialization version -#define SER_FMT_VER_LOWEST 2 +#define SER_FMT_VER_LOWEST 0 #define ser_ver_supported(v) (v >= SER_FMT_VER_LOWEST && v <= SER_FMT_VER_HIGHEST) +void compressZlib(SharedBuffer data, std::ostream &os); +void compressZlib(const std::string &data, std::ostream &os); +void decompressZlib(std::istream &is, std::ostream &os); + void compress(SharedBuffer 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); /*class Serializable