X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=io.lisp;h=ba68048739c57e4ff55b4138d8e48e6308af95cc;hb=78b62107690123d8d7a1a400e4a1d744408a05b1;hp=75ee65087b1c3ccd78ed37749818e5de5c6c3556;hpb=7808e314e1cc884ca3b86cc6936138f97b4f2a2e;p=kmrcl.git diff --git a/io.lisp b/io.lisp index 75ee650..ba68048 100644 --- a/io.lisp +++ b/io.lisp @@ -311,4 +311,9 @@ (write-char #\: stream) (write-string (aref +datetime-number-strings+ minute) stream))) +(defun copy-binary-stream (in out) + (do* ((buf (make-array 4096 :element-type '(unsigned-byte 8))) + (pos (read-sequence buf in) (read-sequence buf in))) + ((zerop pos)) + (write-sequence buf out :end pos)))