gmime.encoding
Module for [Encoding] struct
struct Encoding
Types 1
structEncoding
A context used for encoding or decoding data.
Fields
ContentEncoding encodingthe type of encodingubyte[60] uubufa temporary buffer needed when uuencoding datagboolean encodetrue if encoding or false if decodinguint savesaved bytes from the previous stepint statecurrent encder/decoder stateMethods
size_t flush(string inbuf, ref char[] outbuf)Completes the incremental encode or decode of the input stream (see [gmime.encoding.Encoding.step] for details).void initDecode(gmime.types.ContentEncoding encoding)Initializes a #GMimeEncoding state machine for decoding from encoding.void initEncode(gmime.types.ContentEncoding encoding)Initializes a #GMimeEncoding state machine for encoding to encoding.size_t outlen(size_t inlen)Given the input length, inlen, calculate the needed output length to perform an encoding or decoding step.void reset()Resets the state of the #GMimeEncoding.size_t step(string inbuf, ref char[] outbuf)Incrementally encodes or decodes (depending on state) an input stream by 'stepping' through a block of input at a time.size_t base64DecodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint save)Decodes a chunk of base64 encoded data.size_t base64EncodeClose(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint save)Base64 encodes the input stream to the output stream. Call this when finished encoding data with [gmime.encoding.Encoding.base64EncodeStep] to flush off the last little bit.size_t base64EncodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint save)Base64 encodes a chunk of data. Performs an 'encode step', only encodes blocks of 3 characters to the output at a time, saves left-over state in state and save (initialise to 0 on first invocation).size_t quotedDecodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint save)Decodes a block of quoted-printable encoded data. Performs a 'decode step' on a chunk of QP encoded data.size_t quotedEncodeClose(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint save)Quoted-printable encodes a block of text. Call this when finished encoding data with [gmime.encoding.Encoding.quotedEncodeStep] to flush off the last little bit.size_t quotedEncodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint save)Quoted-printable encodes a block of text. Performs an 'encode step', saves left-over state in state and save (initialise to -1 on first invocation).size_t uudecodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint save)Uudecodes a chunk of data. Performs a 'decode step' on a chunk of uuencoded data. Assumes the "begin mode filename" line has been stripped off.size_t uuencodeClose(ubyte[] inbuf, ref ubyte[] outbuf, ref ubyte[] uubuf, ref int state, ref uint save)Uuencodes a chunk of data. Call this when finished encoding data with [gmime.encoding.Encoding.uuencodeStep] to flush off the last little bit.size_t uuencodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref ubyte[] uubuf, ref int state, ref uint save)Uuencodes a chunk of data. Performs an 'encode step', only encodes blocks of 45 characters to the output at a time, saves left-over state in uubuf, state and save (initialize to 0 on first invocati...