diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-21 19:35:17 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-21 19:35:17 +0300 |
commit | c638442e78b953556e7dadd4c0c34cb0c719bbc8 (patch) | |
tree | a7c623944ba26d64c4fbf3218025d8ec0145d849 /src/serialization.cpp | |
parent | 3c61d57f6d7f627b32b4a8c2f461a8e01e7ac378 (diff) | |
download | minetest-c638442e78b953556e7dadd4c0c34cb0c719bbc8.tar.gz minetest-c638442e78b953556e7dadd4c0c34cb0c719bbc8.tar.bz2 minetest-c638442e78b953556e7dadd4c0c34cb0c719bbc8.zip |
Some work-in-progress in hp and mobs and a frightening amount of random fixes.
Diffstat (limited to 'src/serialization.cpp')
-rw-r--r-- | src/serialization.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/serialization.cpp b/src/serialization.cpp index c324ca0fd..6a43d9190 100644 --- a/src/serialization.cpp +++ b/src/serialization.cpp @@ -105,6 +105,12 @@ void compressZlib(SharedBuffer<u8> data, std::ostream &os) } +void compressZlib(const std::string &data, std::ostream &os) +{ + SharedBuffer<u8> databuf((u8*)data.c_str(), data.size()); + compressZlib(databuf, os); +} + void decompressZlib(std::istream &is, std::ostream &os) { z_stream z; |