Reads a block of base64 characters, decoding it, and returns via str
166826
def read_json_base64
      str = read_json_string
      m = str.length % 4
      if m != 0
        # Add missing padding
        (4 - m).times do
          str += '='
        end
      end
      Base64.strict_decode64(str)
    end
475732
def read_str(self):
        
        length = self.read_uint8()
        return self.unpack(str(length) + 's', length)
899076
function decode(base32String) {
	// Decode to Buffer
	var bytes = base32.parse(base32String, {
		out: Buffer.alloc,
		loose: true
	});

	return bytes.toString("hex");
}
634277
def decode(cls, line):
        
        if line.encoded:
            encoding = getattr(line, 'encoding_param', None)
            if encoding and encoding.upper() == cls.base64string:
                line.value = codecs.decode(self.value.encode("utf-8"), "base64").decode(encoding)
            else:
                line.value = stringToTextValues(line.value)[0]
            line.encoded=False
383714
public static byte[] decodeBytes(String str)
    {
        byte[] ret = null;

        try
        {
            // De-obfuscate the string
            if(str != null)
                ret = Base64.decodeBase64(str.getBytes());
        }
        catch(NoClassDefFoundError e)
        {
            ret = str.getBytes();
            System.out.println("WARNING: unable to decode: "
                +e.getClass().getName()+": "+e.getMessage());
        }

        return ret;
    }
1012353
def decodebytes(input):
    """"""
    py_version = sys.version_info[0]
    if py_version >= 3:
        return _decodebytes_py3(input)
    return _decodebytes_py2(input)
465951
def decode_unicode_string(string):
    
    if string.startswith('[BASE64-DATA]') and string.endswith('[/BASE64-DATA]'):
        return base64.b64decode(string[len('[BASE64-DATA]'):-len('[/BASE64-DATA]')])
    return string
24688
function toBase64(str) {
  //node
  if(typeof Buffer === 'function') {
    return new Buffer(str).toString('base64');
  }

  //browser
  if(typeof btoa === 'function') {
    return btoa(str);
  }

  throw new Error('No base64 encoder available.');
}
584144
def bytes_to_str(s, encoding='utf-8'):
    """"""
    if six.PY3 and isinstance(s, bytes):
        return s.decode(encoding)
    return s
798226
function(base64) {
      // Remove non-base-64 characters
      base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');

      for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
          imod4 = ++i % 4) {
        if (imod4 == 0) continue;
        bytes.push(((base64map.indexOf(base64.charAt(i - 1))
            & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
            | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
      }
      return bytes;
    }
1101705
private byte[] decodeBase64(String text) {
        Objects.requireNonNull(text, Required.PLAIN_TEXT.toString());
        return org.apache.commons.codec.binary.Base64.decodeBase64(text);
    }
599272
def base64decode(_input=None):
    """"""
    missing_padding = 4 - len(_input) % 4
    if missing_padding:
        _input += '=' * missing_padding
    if PY2:  # pragma: no cover
        return base64.decodestring(_input)
    elif PY3:  # pragma: no cover
        if isinstance(_input, bytes):
            return base64.b64decode(_input).decode('UTF-8')
        elif isinstance(_input, str):
            return base64.b64decode(bytearray(_input, encoding='UTF-8')).decode('UTF-8')
1254205
function tryParseBase64ToBytes(b64Str) {
    let decodedStr;

    try {
      decodedStr = atob(b64Str);
    } catch (e) {
      return null;
    }

    return Uint8Array.from(decodedStr, c => c.charCodeAt(0));
  }
693848
def base64_b64encode(instr):
    '''
    
    '''
    return salt.utils.stringutils.to_unicode(
        base64.b64encode(salt.utils.stringutils.to_bytes(instr)),
        encoding='utf8' if salt.utils.platform.is_windows() else None
    )
698184
function decode (str) {
  if (!isValid(str)) throw new Error('baseURL#decode: str not valid baseURL string');

  var bits = '';
  // Decode
  for (var i = 0; i < str.length; i++) {
    bits += indexOfBits(str[i]);
  }
  return bits;
}
343371
def decodeBase64(text, encoding='utf-8'):
    
    text = projex.text.toBytes(text, encoding)
    return projex.text.toUnicode(base64.b64decode(text), encoding)
232610
def b64encoded(self):
        
        if self._b64encoded:
            return text_type(self._b64encoded).strip("\r\n")
        else:
            return base64encode(self.raw)