refactor(3p/lisp/mime4cl): port remaining base64 decoding to qbase64
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>
This commit is contained in:
parent
02684f3ac6
commit
b388354c4d
4 changed files with 39 additions and 75 deletions
8
third_party/lisp/mime4cl/streams.lisp
vendored
8
third_party/lisp/mime4cl/streams.lisp
vendored
|
|
@ -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 ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue