]> git.lizzy.rs Git - minetest.git/blobdiff - src/serialization.h
Formspec: make bgcolor element less confusing and allow setting fullscreen color...
[minetest.git] / src / serialization.h
index c91c3241f5bd29261d52b60185aae305b988ae59..7f8b833825f86da4dfc0beebfc18724df3bd4457 100644 (file)
@@ -17,8 +17,7 @@ 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
+#pragma once
 
 #include "irrlichttypes.h"
 #include "exceptions.h"
@@ -86,14 +85,11 @@ inline bool ser_ver_supported(s32 v) {
        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);
 
 // 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
-