[Mono-dev] About libMonoPosixHelper.so (Was: Re: Announce: Mono.Fuse (+ Required Mono.Posix Changes))

Andreia Gaita shana.ufie at gmail.com
Sat Sep 2 22:15:57 EDT 2006


While you're talking about libMonoPosixHelper.so, I've stumbled onto a
problem while trying to get System.IO.Compression to work with both
the latest and the stable versions. Any call to deflate always blows
up with an exception. I've looked at the source, and it's fine, but
the compiled library being distributed is missing some code,
specifically the create_z_stream function.

For what I can see, the only reason this function would be empty (as
it is), is that the library is being compiled in a system without the
latest zlib library, or at least a library that's flagging this bit of
code (in zlib_macros.c)

#if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1204)
	/* Older versions of zlib do not support raw deflate or gzip */
	return NULL;
#endif

Compiling the source makes it work fine, but all versions of this
library that I've found are broken (at least in red hat and fedora).

On another note, This NULL return makes the managed code throw out an
OutOfMemory Exception, because it believes a null is the library
returning a no memory error. All the error codes and nice errors
structures the zlib library so helpfully provides are completely lost,
the managed code doesn't receive or use them, which is a shame. Also,
most exceptions that are being thrown out are not consistent with the
ones being thrown out by IO.Compression in .NET (they should be
consistent, right?) Is anyone actively mantaining the io.compression
area at present? I'd be happy to take it up.

shana



More information about the Mono-devel-list mailing list