From 1227511d1c2a5652fb026cdc24c19561cc1dd510 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 27 Apr 2007 08:06:02 +0000 Subject: [PATCH] fix gunzip to consume all bytes for the gzip stream svn: r6058 --- collects/mzlib/inflate.ss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/collects/mzlib/inflate.ss b/collects/mzlib/inflate.ss index 5ba10e2365..43fd2b15e2 100644 --- a/collects/mzlib/inflate.ss +++ b/collects/mzlib/inflate.ss @@ -841,7 +841,7 @@ (set! bk (- bk 8)) (set! buf-pos (sub1 buf-pos)) (loop))) - (read-bytes! buffer input-port buf-pos) + (read-bytes! buffer input-port 0 buf-pos) (flush-output wp) #t = (void))) #f)))) @@ -912,7 +912,8 @@ #t)))]) (dynamic-wind void - (lambda () (inflate in out)) + (lambda () (begin0 (inflate in out) + (read-bytes 8 in))) ; read CRC32 and ISIZE (lambda () (when close? (close-output-port out))))))))) (define (gunzip-through-ports in out)