- Config methods are const
- Added
EncoderStringWriter
to allow encoding directly to a String EncoderWriter
now owns its delegate writer rather than keeping a reference to it (though refs still work)- As a consequence, it is now possible to extract the delegate writer from an
EncoderWriter
viafinish()
, which returnsResult<W>
instead ofResult<()>
. If you were callingfinish()
explicitly, you will now need to uselet _ = foo.finish()
instead of justfoo.finish()
to avoid a warning about the unused value.
- As a consequence, it is now possible to extract the delegate writer from an
- When decoding input that has both an invalid length and an invalid symbol as the last byte,
InvalidByte
will be emitted instead ofInvalidLength
to make the problem more obvious.
- Add
BinHex
alphabet
- Add
Bcrypt
alphabet
- A
Read
implementation (DecoderReader
) to let users transparently decoded data from a b64 input source - IMAP's modified b64 alphabet
- Relaxed type restrictions to just
AsRef<[ut8]>
for mainencode*
/decode*
functions - A minor performance improvement in encoding
- Minimum rust version 1.34.0
no_std
is now supported via the two new featuresalloc
andstd
.
- Minimum rust version 1.27.2
- Fix bug in streaming encoding (#90): if the underlying writer didn't write all the bytes given to it, the remaining bytes would not be retried later. See the docs on
EncoderWriter::write
. - Make it configurable whether or not to return an error when decoding detects excess trailing bits.
- Remove line wrapping. Line wrapping was never a great conceptual fit in this library, and other features (streaming encoding, etc) either couldn't support it or could support only special cases of it with a great increase in complexity. Line wrapping has been pulled out into a line-wrap crate, so it's still available if you need it.
Base64Display
creation no longer uses aResult
because it can't fail, which means its helper methods for common configs thatunwrap()
for you are no longer needed
- Add a streaming encoder
Write
impl to transparently base64 as you write. - Remove the remaining
unsafe
code. - Remove whitespace stripping to simplify
no_std
support. No out of the box configs use it, and it's trivial to do yourself if needed:filter(|b| !b" \n\t\r\x0b\x0c".contains(b)
. - Detect invalid trailing symbols when decoding and return an error rather than silently ignoring them.
- Update safemem
- Derive
Clone
forDecodeError
.
- Add support for
crypt(3)
's base64 variant.
decode_config_slice
function for no-allocation decoding, analogous toencode_config_slice
- Decode performance optimization
encode_config_slice
function for no-allocation encoding
STANDARD_NO_PAD
configBase64Display
heap-free wrapper for use in format strings, etc
- Decode performance improvements
- Use
unsafe
in fewer places - Added fuzzers
- Avoid usize overflow when calculating length
- Better line wrapping performance
- Temporarily disable line wrapping
- Add Apache 2.0 license
- MIME support, including configurable line endings and line wrapping
- Removed
decode_ws
- Renamed
Base64Error
toDecodeError
- Allow decoding a
AsRef<[u8]>
instead of just a&str
- Configurable padding
- Encode performance improvements
- Added encode/decode functions that do not allocate their own storage
- Decode performance improvements
- Extraneous padding bytes are no longer ignored. Now, an error will be returned.