internet data handling and encoding base encoding works by grouping binary data into groups of bits ( byteseach -bit group is subdivided into eight -bit components each -bit value is then encoded using the following alphabetvalue encoding - - abcdefghijklmnopqrstuvwxyz - as with base if the end of the input stream does not form -bit groupit is padded to bits and the '=character is used to represent the extra padding in the output at mostthere will be six padding characters ('======')which occurs if the final group only includes byte of data base encoding is the standard hexadecimal encoding of data each -bit group is represented by the digits ' '-' and the letters ' '-'fthere is no extra padding or pad characters for base encoding encode( [altchars]encodes byte string using base encoding altcharsif givenis two-character string that specifies alternative characters to use for '+and '/characters that normally appear in base output this is useful if base encoding is being used with filenames or urls decode( [altchars]decodes string swhich is encoded as base and returns byte string with the decoded data altcharsif givenis two-character string that specifies the alternative characters for '+and '/that normally appear in base -encoded data typeerror is raised if the input contains extraneous characters or is incorrectly padded standard_b encode(sencodes byte string using the standard base encoding standard_b decode(sdecodes string using standard base encoding urlsafe_b encode(sencodes byte string using base but uses the characters '-and '_instead of '+and '/'respectively the same as encode( '- 'urlsafe_b decode(sdecodes string encoded with url-safe base encoding encode(sencodes byte string using base encoding decode( [casefold [map ]]decodes string using base encoding if casefold is trueboth uppercase and lowercase letters are accepted otherwiseonly uppercase letters may appear (the defaultmap if presentspecifies which letter the digit maps to (for examplethe letter 'ior the letter ' 'if this argument is giventhe digit ' is also mapped to lib fl ff