refactor(3p/lisp/mime4cl): use qbase64 for decoding FILE-PORTIONs

Porting over the rest of the decoding (RFC2047) and especially encoding
over to qbase64 is still pending, as it is a little trickier.

Change-Id: Id4740eb074a387aeea2cb94b781e204248530799
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8582
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
sterni 2023-05-16 16:11:00 +02:00 committed by clbot
parent 3d2e55ad53
commit 734cec2e3b
3 changed files with 3 additions and 3 deletions

View file

@ -9,6 +9,7 @@ depot.nix.buildLisp.library {
depot.third_party.lisp.flexi-streams
depot.third_party.lisp.npg
depot.third_party.lisp.trivial-gray-streams
depot.third_party.lisp.qbase64
];
srcs = [

View file

@ -45,7 +45,6 @@
'(unsigned-byte 8))
(defclass quoted-printable-decoder-stream (coder-input-stream-mixin quoted-printable-decoder) ())
(defclass base64-decoder-stream (coder-input-stream-mixin base64-decoder) ())
(defclass 8bit-decoder-stream (coder-input-stream-mixin 8bit-decoder) ())
(defclass quoted-printable-encoder-stream (coder-output-stream-mixin quoted-printable-encoder) ())
@ -262,7 +261,7 @@ be modified to match the :POSITION argument."
(make-instance
(ccase encoding
(:quoted-printable 'quoted-printable-decoder-stream)
(:base64 'base64-decoder-stream))
(:base64 'qbase64:decode-stream))
:underlying-stream portion-stream)
portion-stream))))

View file

@ -28,4 +28,4 @@
(setf ,name (funcall ,parser ,val-var-sym))))))))
(define-configuration-variables
*general-buffer-size* 4096 #'parse-integer)
*general-buffer-size* (min 4096 qbase64:+max-bytes-length+) #'parse-integer)