ofs | hex dump | ascii |
---|
0000 | 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 64 00 00 00 64 08 06 00 00 00 70 e2 95 | .PNG........IHDR...d...d.....p.. |
0020 | 54 00 00 00 06 62 4b 47 44 00 ff 00 ff 00 ff a0 bd a7 93 00 00 00 09 70 48 59 73 00 00 0b 13 00 | T....bKGD..............pHYs..... |
0040 | 00 0b 13 01 00 9a 9c 18 00 00 20 00 49 44 41 54 78 da ed bd 79 74 1c e7 79 e6 fb 7b bf aa de 1b | ............IDATx...yt..y..{.... |
0060 | fb 0e 12 24 b8 8b 2b 00 12 94 48 c9 b2 64 49 b6 24 db 71 64 cb 92 b5 d8 92 62 3b 93 38 33 93 8c | ...$..+...H..dI.$.qd.....b;.83.. |
0080 | 93 cc dc 7b 27 77 96 e4 4c 3c 39 f7 de 4c 4e 32 99 4c 6e e2 d8 92 bc 49 a4 15 db f1 16 4b 96 ac | ...{'w..L<9..LN2.Ln....I.....K.. |
00a0 | c5 12 29 ee e0 be 6f 00 01 90 c4 de dd e8 ad aa de fb 47 75 37 ba 41 90 92 3c 91 6c e7 aa ce e1 | ..)...o...........Gu7.A..<.l.... |
00c0 | 01 ba bb d0 55 f5 3d df bb 3d ef f3 7d 84 77 8f 77 8f 77 8f 77 8f 77 8f 77 8f 77 8f 77 8f b7 72 | ....U.=..=..}.w.w.w.w.w.w.w.w..r |
00e0 | 74 3d 62 2a 5e f7 3c 6a d3 f5 a8 79 77 60 de e9 a3 fb 51 8b ee 47 03 33 40 3c 62 45 7a 1e b1 c2 | t=b*^.<j...yw`....Q..G.3@<bEz... |
0100 | 33 9f db ef 0e 52 d9 21 6f d7 17 f7 3c 6a e1 21 f4 3d e1 00 b0 e6 61 cb b2 2c 36 09 dc 05 a4 15 | 3....R.!o...<j.!.=....a..,6..... |
0120 | be d9 f7 a4 7b bc 04 cc 23 16 fb 9e 74 df 05 e4 ed b1 0a 9b 7d 05 20 0a 56 b2 02 f8 18 ca 63 aa | ....{...#...t.......}...V.....c. |
0140 | 2c 07 10 23 3f 45 f8 b2 aa 7e b7 ef 09 f7 b2 7f de 0a 94 13 f4 3d e1 bd 0b c8 db 13 37 ac 06 11 | ,..#?E...~...........=......7... |
0160 | ee 05 1e 42 b9 c5 d8 42 b8 16 f5 5c 24 3b a9 78 1e 19 11 fe 01 f8 86 e3 f0 fd 83 5f 73 f3 00 dd | ...B...B...\$;.x..........._s... |
0180 | 8f d9 e0 c1 be 27 9d 77 01 f9 5f 89 15 fb 9e 98 71 39 5d 8f 5a f7 0a f2 00 aa 1f 44 24 1a ae 81 | .....'.w.._.....q9].Z......D$... |
01a0 |
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef SERIALIZATION_HEADER
#define SERIALIZATION_HEADER
#include "irrlichttypes.h"
#include "exceptions.h"
#include <iostream>
#include "util/pointer.h"
/*
Map format serialization version
--------------------------------
For map data (blocks, nodes, sectors).
NOTE: The goal is to increment this so that saved maps will be
loadable by any version. Other compatibility is not
maintained.
0: original networked test with 1-byte nodes
1: update with 2-byte nodes
2: lighting is transmitted in param
3: optional fetching of far blocks
4: block compression
5: sector objects NOTE: block compression was left accidentally out
6: failed attempt at switching block compression on again
7: block compression switched on again
8: server-initiated block transfers and all kinds of stuff
9: block objects
10: water pressure
11: zlib'd blocks, block flags
12: UnlimitedHeightmap now uses interpolated areas
13: Mapgen v2
14: NodeMetadata
15: StaticObjects
16: larger maximum size of node metadata, and compression
17: MapBlocks contain timestamp
18: new generator (not really necessary, but it's there)
19: new content type handling
20: many existing content types translated to extended ones
21: dynamic content type allocation
22: minerals removed, facedir & wallmounted changed
23: new node metadata format
24: 16-bit node ids and node timers (never released as stable)
25: Improved node timer format
26: Never written; read the same as 25
*/
// This represents an uninitialized or invalid format
#define SER_FMT_VER_INVALID 255
// Highest supported serialization version
#define SER_FMT_VER_HIGHEST_READ 26
// Saved on disk version
#define SER_FMT_VER_HIGHEST_WRITE 25
// Lowest supported serialization version
| .p.T7=..gd!^q...P...O.UE.....Z.. |
0460 | 82 97 2a fc f4 b4 ec 7c 55 d4 53 a4 f8 b9 37 f3 be a7 45 b3 50 bc 59 80 bd be 35 c3 ea c3 29 d9 | ..*....|U.S...7...E.P.Y...5...). |
0480 | f0 40 e4 3d c9 b8 f7 a2 8a fe 1d ca a2 78 83 68 d7 7d 51 36 7c 32 4a 5d 87 51 63 08 ab c8 7f 10 | .@.=.........x.h.}Q6|2J].Qc..... |
04a0 | 38 d1 f3 50 f8 be 9e 87 c2 06 b5 66 8a da 87 c2 bf dc 31 44 cc ac 7a 42 fc 99 2c 15 c1 dc a0 68 | 8..P.......f......1D..zB..,....h |
04c0 | d9 7b 95 d1 42 66 c7 0e 99 2b de eb 4c 6a 20 fe cc 91 82 cf ba e1 e3 61 71 6d e9 1c 15 fd f7 2a | .{..Bf...+..Lj.........aqm.....* |
04e0 | fa 19 11 91 60 d4 e8 fc f5 01 e6 6f 0c 4a 20 ec 27 07 1b 1e b1 64 b0 cf e1 ec 2b 59 cd 26 75 9e | ....`......o.J..'....d....+Y.&u. |
0500 | e7 ea 16 e0 25 11 fe cd fa 87 23 07 f6 7c 2d ed ee fb 7a 86 0d 9f 8c e2 7a 1e fb be 9e f9 e5 03 | ....%.....#..|-...z.....z....... |
0520 | 64 ee ec f5 0a 3
void compressZlib(const std::string &data, std::ostream &os, int level = -1);
void decompressZlib(std::istream &is, std::ostream &os);
// 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 std::string &data, std::ostream &os, u8 version);
void decompress(std::istream &is, std::ostream &os, u8 version);
#endif
|