I converted each string into a byte array (using .GetBytes(SringHere) ) and then encoded the byte array into base64 (using Convert.ToBase64String(ByteArrayHere) ).įrom the data I've collected it appears that the overhead associated with using Base64 approaches 33 1/3% the more data you choose to encode. So, three 8-bits bytes of the input string/binary file (3×8 bits 24 bits) can. The only drawback is that the size of the result will increase to 33. Yeah, that’s right, 64 characters is enough to encode any data of any length. To test the practical effects of Base64 encoding I created C# strings of 1, 10, 100, 100 characters in length. Each Base64 digit represents exactly 6 bits of data. The Base64 Alphabet contains 64 basic ASCII characters which are used to encode data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |