Package: libmono-system2.0-cil Version: 1.1.13.8-1 Severity: normal Trying to use DeflateStream results in a "Unhandled Exception: System.EntryPointNotFoundException: create_z_stream" if running directly the exe, and giving a SIGSEGV if running it through nunit-console.
This is a demo of the code: ============== TestDeflate.cs ============== using System; using System.IO; using System.IO.Compression; using NUnit.Framework; [TestFixture] public class Test { private bool Passed; public byte[] Compress(byte[] data) { MemoryStream s = new MemoryStream(); DeflateStream deflate = new DeflateStream(s, CompressionMode.Compress); deflate.Write(data, 0, data.Length); return s.ToArray(); } public byte[] Decompress(byte[] data) { MemoryStream s = new MemoryStream(); DeflateStream deflate = new DeflateStream(s, CompressionMode.Decompress); int offset = 0; while (true) { int bytesRead = stream.Read(data, offset, 100); if (bytesRead == 0) break; offset += bytesRead; } return s.ToArray(); } [Test] public void Run() { byte[] src = new byte[]{1,2,3,4,5,1,1,1,1,1,1,1}; byte[] dest, compressed; compressed = Compress(src); dest = Decompress(compressed); Passed = src == dest; } public static int Main(string[] args) { Test test = new Test(); test.Run(); if (test.Passed) { System.Console.WriteLine("OK"); return 0; } else { System.Console.WriteLine("KO"); return -1; } } } ============== TestDeflate.cs ============== Compile with gmcs (DeflateStream is a .NET 2.0 feature): $ gmcs TestDeflate.cs /reference:/usr/lib/cli/nunit-2.2.6/nunit.framework.dll NUnit gives a SIGSEGV (perhaps this should be forwarded to the nunit pkg): $ nunit-console ./TestDeflate.exe Running the program throws an EntryPointNotFoundException: $ ./TestDeflate.exe -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.17-1-686 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=UTF-8) Versions of packages libmono-system2.0-cil depends on: ii libmono-corlib2.0-cil 1.1.13.8-1 Mono core library (2.0) ii libmono-security2.0-cil 1.1.13.8-1 Mono Security library libmono-system2.0-cil recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]