yenc - v2.0.0
    Preparing search index...

    Interface YEnc

    Interface for the yEnc encoder/decoder API.

    interface YEnc {
        decode: (source: string) => string;
        decodeBytes: (source: string) => Uint8Array;
        encode: (source: string) => string;
        encodeBytes: (bytes: Uint8Array) => string;
    }
    Index

    Properties

    decode: (source: string) => string

    Decode a yEnc-encoded string to the original string.

    Type declaration

      • (source: string): string
      • Parameters

        • source: string

          The yEnc-encoded string.

        Returns string

        The decoded string.

    decodeBytes: (source: string) => Uint8Array

    Decode a yEnc-encoded string to the original bytes.

    Type declaration

      • (source: string): Uint8Array
      • Parameters

        • source: string

          The yEnc-encoded string.

        Returns Uint8Array

        The decoded bytes as a Uint8Array.

    encode: (source: string) => string

    Encode a string to yEnc format.

    Type declaration

      • (source: string): string
      • Parameters

        • source: string

          The source string to encode.

        Returns string

        The yEnc-encoded string.

    encodeBytes: (bytes: Uint8Array) => string

    Encode an array of bytes to yEnc format.

    Type declaration

      • (bytes: Uint8Array): string
      • Parameters

        • bytes: Uint8Array

          The source bytes to encode.

        Returns string

        The yEnc-encoded string.