about summary refs log tree commit diff
path: root/third_party/lisp/mime4cl/streams.lisp
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2023-05-18T15·19+0200
committerclbot <clbot@tvl.fyi>2023-05-18T16·18+0000
commitb388354c4d34f67ab92d98fbb90dc07e3cdc5430 (patch)
treef1c6d704e1007352d04f4863f68485e2e85daeca /third_party/lisp/mime4cl/streams.lisp
parent02684f3ac66c5a87443da799b08b1b3629d29b03 (diff)
refactor(3p/lisp/mime4cl): port remaining base64 decoding to qbase64 r/6156
DECODE-BASE64-STREAM-TO-SEQUENCE is the only thing that requires
anything fancy: We read into an adjustable array. Alternative could be
using REDIRECT-STREAM and WITH-OUTPUT-TO-STRING, but that is likely
slower (untested).

Test cases are kept for now to confirm that qbase64 is conforming to our
expectations, but can probably dropped in favor of a few more sample
messages in the test suite.

:START and :END are sadly no longer supported and need to be replaced by
SUBSEQ.

Change-Id: I5928aed7551b0dea32ee09518ea6f604b40c2863
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8586
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'third_party/lisp/mime4cl/streams.lisp')
-rw-r--r--third_party/lisp/mime4cl/streams.lisp8
1 files changed, 0 insertions, 8 deletions
diff --git a/third_party/lisp/mime4cl/streams.lisp b/third_party/lisp/mime4cl/streams.lisp
index 7e9fc16d316f..71a32d84e461 100644
--- a/third_party/lisp/mime4cl/streams.lisp
+++ b/third_party/lisp/mime4cl/streams.lisp
@@ -27,14 +27,6 @@
       (flexi-stream-root-stream (flexi-stream-stream stream))
       stream))
 
-(defun redirect-stream (in out &key (buffer-size 4096))
-  "Consume input stream IN and write all its content to output stream OUT.
-The streams' element types need to match."
-  (let ((buf (make-array buffer-size :element-type (stream-element-type in))))
-    (loop for pos = (read-sequence buf in)
-          while (> pos 0)
-          do (write-sequence buf out :end pos))))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defclass coder-stream-mixin ()