Has anyone else noticed that when you attach a file to an e-mail message with a web-based e-mail system (like Yahoo), the file size listed is far greater than what the file size is listed on your PC. For example, a file that is 4 MB will show up on my yahoo account as 6 MB. Why is that?
Binary files are encoded into text files. The classic method was uuencoding, but “base64” is now popular. This is done so that special symbols don’t get “eaten” along the way by systems that aren’t “8-bit clean” and such. These methods make the file larger. Start reading here:
File attachments are generally encoded into a text-only format to make them more simply transportable across different kinds of mail servers. There are a few commonly used formats: base64, uuencode, and quoted-printable being some.
The encoded format is generally larger than the original and you are likely seeing that size. If you save the attachment it should be back to the original since that process will decode it.
Consider the 8-bit clean argument – lots of older systems defined a byte as seven bits rather than eight. So to transcode an 8-bit word into a 7-bit system, you’re using two bytes instead of one. Okay, that’s highly simplistic, but in essence that’s what happening. Everything gets – what? – 15% bigger because you need more bytes to hold the bits.
Back when these systems were created, they were concerned with text characters only, and you could encode the whole US alphabet and control characters into 127 (7-bit) codes. Now days, we have Unicode that takes 21-bits (why not 24 or 32? Who knows).