#### FDECODE

#### Synopsis

    HELP:   Additional enforced decoding [NONE]
    TYPE:   OVERLAY
    SYNTAX: FDECODE/COD.{BASE64/ARMOR/PGP/BASE32/BASE16}

#### Description

The overlay 'fdecode' allows you to add an additional decoding step after auto decoding ('decode' parameter defined) was done.

On 'read.bin()' with the 'decode' parameter set, encrypted data (PGP, ...) is automatically decrypted and compressed data (GZIP, ...) is decompressed if the method is supported by FLAM. If the encrypted or compressed data is base encoded, it will decoded before decompression or decryption. However, there is no automatic base decoding of the decompressed or decrypted data since we are in binary mode and, therefore, it is impossible to guess whether you want to read base encoded or decoded data. The data might not even be base encoded, but just look like it is.

'fdecode' allows you to enforce base decoding after auto decoding by specifying the base to use. If you specify a base, but the data is not encoded with this base, you will get an error.

If you define 'decode=CMPDEC' or 'decode=ALWAYS' then a base decoding after decompression is done, if a base decoding is possible. This option can be used on behalf of 'fdecode', but auto detection of the correct base may fail. Therefore, it is suitable to use the 'fdecode' parameter if you already know the base.

The enforcement of base decoding can even be used if no auto decoding is activated (i.e. 'decode' parameter not specified).

See below for the decoding possibilities.

#### Arguments

- `SWITCH: BASE64/ARMOR/PGP - Base64 decoding (RFC4648)`
- `SWITCH: BASE32 - Base32 decoding (RFC4648)`
- `SWITCH: BASE16 - Base16 decoding (RFC4648)`