X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=io.lisp;h=ba68048739c57e4ff55b4138d8e48e6308af95cc;hp=75ee65087b1c3ccd78ed37749818e5de5c6c3556;hb=1b7f506ec98bd5b885203a3250c52603b943cee9;hpb=753fe2d6bbe8e8c8a6fa6154e829c6586b0c2ff3 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)))