docstr: Performs Base69 decoding
docstr_tok: ["Performs","Base69","decoding"]
code: def decode(self, ctext: T) -> Optional[U]:
      """
      Performs Base69 decoding
      """
      # Remove whitespace
      try:
          ctext = re.sub(r"\s+", "", ctext, flags=re.UNICODE)
          extra_bytes = 0
          clen = len(ctext)
  
          if ctext[:-1] == "=":
              extra_bytes = int(ctext[clen - 2])
  
          CHUNK_COUNT = ceil(clen / 16)
          result = [0 for _ in range(CHUNK_COUNT * 7 - extra_bytes)]
  
          for i in range(CHUNK_COUNT):
              chunk_string = ctext[i * 16 : (i + 1) * 16]
              if extra_bytes and (i == CHUNK_COUNT - 1):
                  insert = self.decode_chunk(chunk_string)
                  for n, elem in enumerate(insert[0 : 7 - extra_bytes]):
                      result[n + i * 7] = elem
              else:
                  insert = self.decode_chunk(chunk_string)
                  for n, elem in enumerate(insert):
                      result[n + i * 7] = elem % 256
          return bytearray(result).decode().strip("\x00")
      except Exception:
          return None
  
file_path: Ciphey/ciphey/basemods/Decoders/base69.py
imports: import re
  from math import ceil
  from typing import Dict, Optional
  from ciphey.iface import Config, Decoder, ParamSpec, T, U, WordList, registry
label_desc: Use image node_id 1 for calling the Base69 obj's underlying member method code with example usage: obj.decode(ctext) and returns: bytearray, None