From 60ad69b8c968e5c4d08056ef68d990e26f950d91 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 25 May 2020 10:46:49 +0530 Subject: email: Decode base64 bytevector without converting to string. The new base64 decoder can directly operate on bytevectors in addition to strings. This feature may not remain forever, but it greatly improves performance. So, it stays for now. * email/email.scm (decode-body): Decode base64 encoded body directly without converting to an intermediate string. --- email/email.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'email') diff --git a/email/email.scm b/email/email.scm index 928296d..361a566 100644 --- a/email/email.scm +++ b/email/email.scm @@ -886,8 +886,7 @@ list of header keys and values." (define* (decode-body body encoding #:optional charset) (let ((decoded-octets (case encoding - ((base64) (base64-decode - (bytevector->string body "us-ascii"))) + ((base64) (base64-decode body)) ((quoted-printable) (quoted-printable-decode (bytevector->string body "us-ascii"))) ((#{7bit}# #{8bit}# binary) body) -- cgit v1.2.3