For example, a mail server may discard the eighth bit when sending emails. This led to the fact that some data was simply lost during the transfer between the new and the old systems. By the time the eight-bit encoding was approved as a standard, many systems used old encodings and did not support the “new standard”. Now we use eight-bit bytes, but before that were used seven-bit, six-bit, and even three-bit bytes. The history of the Base64 started long ago, in those times when engineers argued how many bits should be in a byte. In fact, it is a binary-to-text encoding, whose task is to encode binary data into printable characters, when the data transmission channel or the storage medium cannot handle 8-bit character encodings. Well, the story about Alice and Bob is just a thought-out example to tell you what kind of problem solves the Base64 algorithm. I grouped bits only to show that each group meets each character of the Base64 string. Even if you remove spaces or padding zeros from binary digits, the Base64 string will still be shorter. To reduce costs, Alice and Bob agree to use a more efficient data transfer method by using a special alphabet, which replaces every “six digits” with one “letter”. The second problem is that the tariffs for phone calls are too expensive and dictate each byte as 8 binary digits will last too long. In this case, Alice may convert the image into the binary system and dictate to Bob the binary digits (bits), after that he will be able to convert them back to the original image. The first problem is that she cannot simply describe how the image looks, because Bob needs an exact copy. To figuratively understand why Base64 was invented, imagine that during a phone call Alice wants to send an image to Bob. Thanks to it, you can convert Chinese characters, emoji, and even images into a “readable” string, which can be saved or transferred anywhere. Guru A virtual teacher who reveals to you the great secrets of Base64īase64 is a encoding algorithm that allows you to transform any characters into an alphabet which consists of Latin letters, digits, plus, and slash.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |