Gjsify LogoGjsify Logo

A context used for encoding or decoding data.

record

Hierarchy

  • Encoding

Index

Constructors

Properties

encode: boolean

%TRUE if encoding or %FALSE if decoding

field
encoding: ContentEncoding

the type of encoding

field
save: number

saved bytes from the previous step

field
state: number

current encder/decoder state

field
uubuf: Uint8Array

a temporary buffer needed when uuencoding data

field
name: string

Methods

  • flush(inbuf: string, inlen: number, outbuf: string): number
  • Completes the incremental encode or decode of the input stream (see g_mime_encoding_step() for details).

    Parameters

    • inbuf: string

      an input buffer to encode or decode

    • inlen: number

      input buffer length

    • outbuf: string

      an output buffer

    Returns number

  • Initializes a #GMimeEncoding state machine for decoding from encoding.

    Parameters

    Returns void

  • Initializes a #GMimeEncoding state machine for encoding to encoding.

    Parameters

    Returns void

  • outlen(inlen: number): number
  • Given the input length, inlen, calculate the needed output length to perform an encoding or decoding step.

    Parameters

    • inlen: number

      an input length

    Returns number

  • reset(): void
  • step(inbuf: string, inlen: number, outbuf: string): number
  • Incrementally encodes or decodes (depending on state) an input stream by 'stepping' through a block of input at a time.

    You should make sure outbuf is large enough by calling g_mime_encoding_outlen() to find out how large outbuf might need to be.

    Parameters

    • inbuf: string

      an input buffer to encode or decode

    • inlen: number

      input buffer length

    • outbuf: string

      an output buffer

    Returns number

  • base64DecodeStep(inbuf: number, inlen: number, outbuf: number, state: number, save: number): number
  • Decodes a chunk of base64 encoded data.

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output buffer

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been decoded

    Returns number

  • base64EncodeClose(inbuf: number, inlen: number, outbuf: number, state: number, save: number): number
  • Base64 encodes the input stream to the output stream. Call this when finished encoding data with g_mime_encoding_base64_encode_step() to flush off the last little bit.

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output buffer

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been encoded

    Returns number

  • base64EncodeStep(inbuf: number, inlen: number, outbuf: number, state: number, save: number): number
  • 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).

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output buffer

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been encoded

    Returns number

  • quotedDecodeStep(inbuf: number, inlen: number, outbuf: number, state: number, save: number): number
  • Decodes a block of quoted-printable encoded data. Performs a 'decode step' on a chunk of QP encoded data.

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output buffer

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been decoded

    Returns number

  • quotedEncodeClose(inbuf: number, inlen: number, outbuf: number, state: number, save: number): number
  • Quoted-printable encodes a block of text. Call this when finished encoding data with g_mime_encoding_quoted_encode_step() to flush off the last little bit.

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output buffer

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been encoded

    Returns number

  • quotedEncodeStep(inbuf: number, inlen: number, outbuf: number, state: number, save: number): number
  • 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).

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output buffer

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been encoded

    Returns number

  • uudecodeStep(inbuf: number, inlen: number, outbuf: number, state: number, save: number): number
  • 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.

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output buffer

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been decoded

    Returns number

  • uuencodeClose(inbuf: number, inlen: number, outbuf: number, uubuf: number, state: number, save: number): number
  • Uuencodes a chunk of data. Call this when finished encoding data with g_mime_encoding_uuencode_step() to flush off the last little bit.

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output buffer

    • uubuf: number

      temporary buffer of 60 bytes

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been encoded

    Returns number

  • uuencodeStep(inbuf: number, inlen: number, outbuf: number, uubuf: number, state: number, save: number): number
  • 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 invocation).

    Parameters

    • inbuf: number

      input buffer

    • inlen: number

      input buffer length

    • outbuf: number

      output stream

    • uubuf: number

      temporary buffer of 60 bytes

    • state: number

      holds the number of bits that are stored in save

    • save: number

      leftover bits that have not yet been encoded

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method