At least Mono 1.1.13.8 has a bug that will prevent you from using the GZipStream library; the constructor will throw OutOfMemoryException. Several pages have documented this bug.
The libMonoPosixHelper.so distributed in the
package mono-core-1.1.13.8-0.novell.i586.rpm,
and in all previous and post releases that I've seen, has been compiled with an
old version of zlib. This version problem causes the
create_z_stream function to become a stub; my
disassembly of the libMono library shows that the function is empty, and there
is no import of the deflateInit2 function that is used in the Mono source code.
So to get the System.IO.Compression to work, the
libMonoPosixHelper library must be compiled from
the source. (You can use either stable or latest; there is no difference
between the two for now.) To compile this,
There is no need to compile the rest of the mono code, as this library is
standalone and independent of the Mono .NET framework version.
I have also modified the zlib wrapper code. I made some modifications to be able to log any errors that come out of the zlib library, as the current implementation of the wrapper essentially discards these. (Why they do this is completely beyond me; the zlib library has nice errors.) So if there are any problems, they are logged to stderr.
Fixed libMonoPosixHelper.so for Red Hat Enterprise 4.0 x86