You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a helper function that uses base64::write::EncoderWriter #4483
We can add a helper function that uses [base64::write::EncoderWriter](https://docs.rs/base64/0.22.0/base64/write/struct.EncoderWriter.html). But I believe it's out of the scope of current PR, maybe worth a new one.
BASE64_STANDARD.encode(body) requires the whole slices which adds an extra copy for Buffer. We can use base64::write::EncoderWriter to allow build base64 from Buffer.
Activity
Xuanwo commentedon Apr 13, 2024
Ah,
EncoderWriteris not zero cost compared toencode. Maybe it's better to useBuffer::to_bytes()as is. Closing.