[erlang-questions] zlib deflate problem

Matthew Dempsky matthew@REDACTED
Tue May 20 04:15:08 CEST 2008


On Mon, May 19, 2008 at 10:55 AM, Colm <colm.dougan@REDACTED> wrote:
> Am I doing something dumb here or is this a bug in the erlang zlib
> interface?  I strongly suspect it is the former.

Your code looks fine to me.  Can you try applying the patch below to
erts/emulator/drivers/common/zlib_drv.c and checks for any
regressions?  (Z_BUF_ERROR is a non-fatal error case for inflate(3);
it just indicates that zlib wasn't able to make any progress with the
data given.)

--- zlib_drv.c.orig	2008-05-19 19:09:00.000000000 -0700
+++ zlib_drv.c	2008-05-19 19:09:12.000000000 -0700
@@ -257,6 +257,10 @@
 		driver_deq(d->port, len);
 		return res;
 	    }
+	    if (res == Z_BUF_ERROR) {
+		res = Z_OK;
+	    }
 	    if (res < 0) {
 		return res;
 	    }



More information about the erlang-questions mailing list