[zip-cvs] CVS update: zip/zip.lisp
David Lichteblau
dlichteblau at common-lisp.net
Tue Apr 5 14:04:31 UTC 2005
Update of /project/zip/cvsroot/zip
In directory common-lisp.net:/tmp/cvs-serv1848
Modified Files:
zip.lisp
Log Message:
don't call salza functions for empty subsequences
(thanks to Edi Weitz for the bugreport)
Date: Tue Apr 5 16:04:31 2005
Author: dlichteblau
Index: zip/zip.lisp
diff -u zip/zip.lisp:1.2 zip/zip.lisp:1.3
--- zip/zip.lisp:1.2 Sun Apr 3 22:42:01 2005
+++ zip/zip.lisp Tue Apr 5 16:04:30 2005
@@ -133,12 +133,14 @@
:callback #'flush-stream)))
(loop
(let ((end (read-sequence input-buffer input)))
- (salza:zlib-write-sequence input-buffer zlib-stream :end end)
- (incf nin end)
- (setf crc (update-crc crc input-buffer end))
- (when (zerop end)
- (salza:finish-zlib-stream zlib-stream)
- (return (values nin nout crc)))))))))
+ (cond
+ ((plusp end)
+ (salza:zlib-write-sequence input-buffer zlib-stream :end end)
+ (incf nin end)
+ (setf crc (update-crc crc input-buffer end)))
+ (t
+ (salza:finish-zlib-stream zlib-stream)
+ (return (values nin nout crc))))))))))
(defun store (in out)
"Copy uncompressed bytes from IN to OUT and return values like COMPRESS."
More information about the Zip-cvs
mailing list