internet data handling and encoding his describes modules related to processing common internet data formats and encodings such as base htmlxmland json base the base module is used to encode and decode binary data into text using base base or base encoding base is commonly used to embed binary data in mail attachments and with parts of the http protocol official details can be found in rfc- and rfc- base encoding works by grouping the data to be encoded into groups of bits ( byteseach -bit group is then subdivided into four -bit components each -bit value is then represented by printable ascii character from the following alphabetvalue encoding - - - pad abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz if the number of bytes in the input stream is not multiple of ( bits)the data is padded to form complete -bit group the extra padding is then indicated by special '=characters that appear at the end of the encoding for exampleif you encode byte character sequencethere are five -byte groups with byte left over the remaining byte is padded to form -byte group this group then produces two characters from the base alphabet (the first bitswhich include bits of real data)followed by the sequence '=='representing the bits of extra padding valid base encoding will only have zeroone (=)or two (==padding characters at the end of the encoding lib fl ff