From ba4185aea537f5067b4fc04789ea2a54dece991c Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 27 May 2006 18:38:40 +0000 Subject: [PATCH] fix CRC value svn: r3088 --- collects/mzlib/deflate.ss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/collects/mzlib/deflate.ss b/collects/mzlib/deflate.ss index ffdeb27e14..af7d05e713 100644 --- a/collects/mzlib/deflate.ss +++ b/collects/mzlib/deflate.ss @@ -2035,11 +2035,10 @@ ;; * Run a set of bytes through the crc shift register. If s is a NULL ;; * pointer, then initialize the crc shift register contents instead. ;; */ -(define crc 0) +(define crc #xffffffff) (define (updcrc s n) ;; uch *s; /* pointer to bytes to pump through */ ;; unsigned n; /* number of bytes in s[] */ - (if s (let loop ([c crc][p 0]) (if (= p n) @@ -2223,7 +2222,7 @@ (flush_outbuf) - (values bytes_in bytes_out crc)) + (values bytes_in bytes_out (bitwise-xor crc #xffffffff))) (define (gzip-through-ports in out origname time_stamp)