Base32Impl.decode

Decodes source and stores the result in buffer. If no _buffer is assigned, a new buffer will be created.

  1. ubyte[] decode(in C[] source, UB[] buffer = null)
  2. ubyte[] decode(CR source, UB[] buffer = null)
    template Base32Impl(UseHex useHex = UseHex.no, UsePad usePad = UsePad.yes)
    ubyte[]
    decode
    (
    CR
    UB = ubyte
    )
    (
    ,
    UB[] buffer = null
    )
    if (
    !isArray!CR &&
    isInputRange!CR
    &&
    is(ElementType!CR : dchar)
    &&
    hasLength!CR
    &&
    isOutputRange!(UB[], ubyte)
    )
    in { assert (!buffer.ptr || buffer.length >= decodeLength(source.length), "Insufficient buffer for decoding"); }
    out (result) {}
  3. size_t decode(in C[] source, UBR range)
  4. size_t decode(CR source, UBR range)

Parameters

source
Type: CR

A _base32 InputRange to decode.

buffer
Type: UB[]

An array to store the decoded result.

Return Value

Type: ubyte[]

The slice of buffer containing the result.

Throws

Exception if source is an invalid _base32 data.

Meta