From c638442e78b953556e7dadd4c0c34cb0c719bbc8 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 21 Apr 2011 19:35:17 +0300 Subject: Some work-in-progress in hp and mobs and a frightening amount of random fixes. --- src/serialization.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/serialization.cpp') 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 data, std::ostream &os) } +void compressZlib(const std::string &data, std::ostream &os) +{ + SharedBuffer databuf((u8*)data.c_str(), data.size()); + compressZlib(databuf, os); +} + void decompressZlib(std::istream &is, std::ostream &os) { z_stream z; -- cgit v1.2.3