1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

increased the z-buffer to 10 MB

This commit is contained in:
Zeno Rogue 2021-05-23 15:59:06 +02:00
parent 3d12529b78
commit 5d30ec70d3

View File

@ -670,8 +670,8 @@ EX string compress_string(string s) {
println(hlog, "init ok");
strm.avail_in = isize(s);
strm.next_in = (Bytef*) &s[0];
vector<char> buf(1000000, 0);
strm.avail_out = 1000000;
vector<char> buf(10000000, 0);
strm.avail_out = 10000000;
strm.next_out = (Bytef*) &buf[0];
if(deflate(&strm, Z_FINISH) != Z_STREAM_END) throw hr_exception("z-error-2");
println(hlog, "deflate ok");
@ -689,8 +689,8 @@ EX string decompress_string(string s) {
if(ret != Z_OK) throw hr_exception("z-error");
strm.avail_in = isize(s);
strm.next_in = (Bytef*) &s[0];
vector<char> buf(1000000, 0);
strm.avail_out = 1000000;
vector<char> buf(10000000, 0);
strm.avail_out = 10000000;
strm.next_out = (Bytef*) &buf[0];
if(inflate(&strm, Z_FINISH) != Z_STREAM_END) throw hr_exception("z-error-2");
string out(&buf[0], (char*)(strm.next_out) - &buf[0]);