diff options
author | Arun Isaac | 2020-05-25 10:46:49 +0530 |
---|---|---|
committer | Arun Isaac | 2020-05-25 19:59:00 +0530 |
commit | 60ad69b8c968e5c4d08056ef68d990e26f950d91 (patch) | |
tree | 7366a98d4db16ed1ca5cd8b20c0a390ed30495b9 /email | |
parent | 88a6cb6f8e27d80ac818b4d827063a8c9c6822d7 (diff) | |
download | guile-email-60ad69b8c968e5c4d08056ef68d990e26f950d91.tar.gz guile-email-60ad69b8c968e5c4d08056ef68d990e26f950d91.tar.lz guile-email-60ad69b8c968e5c4d08056ef68d990e26f950d91.zip |
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.
Diffstat (limited to 'email')
-rw-r--r-- | email/email.scm | 3 |
1 files changed, 1 insertions, 2 deletions
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) |