This makes creating compressed packs work. The temporary file is opened
with M_RDWR because we want to read the data back from the same handle, so
ZlibCompressed can't autodetect the mode.
void Input::set_decompress()
{
- compressed = new IO::ZlibCompressed(*in);
+ compressed = new IO::ZlibCompressed(*in, IO::M_READ);
in = compressed;
}
void Output::set_compressed()
{
- compressed = new IO::ZlibCompressed(*out);
+ compressed = new IO::ZlibCompressed(*out, IO::M_WRITE);
out = compressed;
}