Index: z3.scm
===================================================================
--- z3.scm	(revision 16161)
+++ z3.scm	(working copy)
@@ -220,15 +220,20 @@
 (define (z3:open-compressed-input-file filename)
   (let* ((fd (file-open filename (bitwise-ior open/read open/binary)))
 	 (z3 (z3:decode-file fd)) 
+	 (eof #f)
 	 (buf #f) 
 	 (len 0)
 	 (pos 0) )
     (define (read-next)
-      (let ((b (z3:read-decoded z3)))
-	(cond ((eof-object? b) b)
-	      (else
-	       (set! buf b)
-	       (set! len (string-length b)) ) ) ) )
+      (if eof
+	#!eof
+	(let ((b (z3:read-decoded z3)))
+	  (cond ((eof-object? b)
+		 (set! eof #t)
+		 b)
+		(else
+		 (set! buf b)
+		 (set! len (string-length b)) ) ) ) ) )
     (make-input-port
      (lambda ()
        (cond ((fx>= pos len)
