mimekit-ts - v1.0.0
    Preparing search index...

    Class HexEncoder

    Incrementally encodes content using URI-style hex encoding.

    This is mostly meant for encoding parameter values using the rules specified by RFC 2184 and RFC 2231.

    Implements

    Index
    encoding: ContentEncoding = 'default'

    The encoding that this encoder supports.

    • Estimates the number of bytes needed to encode the specified number of input bytes.

      Parameters

      • inputLength: number

        The input length.

      Returns number

      The estimated output length.

    • Encodes the specified input into the output buffer.

      Parameters

      • input: Uint8Array

        The input buffer.

      • startIndex: number

        The starting index of the input buffer.

      • length: number

        The length of the input range.

      • output: Uint8Array

        The output buffer.

      Returns number

      The number of bytes written to the output buffer.

      The input range is invalid or the output buffer is too small.

    • Encodes the specified input into the output buffer and flushes internal state.

      Parameters

      • input: Uint8Array

        The input buffer.

      • startIndex: number

        The starting index of the input buffer.

      • length: number

        The length of the input range.

      • output: Uint8Array

        The output buffer.

      Returns number

      The number of bytes written to the output buffer.