View source code Display the source code in std/base64.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

Template std.base64.Base64Impl

Core implementation for Base64 format.

Arguments

template Base64Impl(char Map62th, char Map63th, char Padding);

Functions

Function name Description
decode Decodes source into buffer.
decode Decodes source into range.
decode Decodes source into new buffer.
decodeLength Calculates the minimum length for decoding.
decoder Iterates through an InputRange at a time by using Decoder.
encode Encodes source into buffer.
encode Encodes source into range.
encode Encodes source to new buffer.
encodeLength Calculates the minimum length for encoding.
encoder Iterates through an InputRange at a time by using Encoder.

Structs

Struct name Description
Decoder Range that decodes chunk data at a time.
Decoder Range that decodes single character at a time.
Encoder Range that encodes chunk data at a time.
Encoder Range that encodes single character at a time.

Example

alias Base64   = Base64Impl!('+', '/');                    // The Base64 format(Already defined).
alias Base64Re = Base64Impl!('!', '=', Base64.NoPadding);  // non-standard Base64 format for Regular expression

NOTE

encoded-string doesn't have padding character if set Padding parameter to NoPadding.

Authors

Masahiro Nakagawa, Daniel Murphy (Single value Encoder and Decoder)

License

Boost License 1.0.

Comments