Šodienas jautājumu un atbilžu sesija mums priecājas par SuperUser - Stack Exchange dalību, kas ir kopienas vadīta Q & A tīmekļa vietņu grupa.
Jautājums
SuperUser lasītājs arc_lupus vēlas uzzināt, kāpēc viņa e-pasta ziņas izmērs ir lielāks par pievienotajiem failiem:
When attaching files to email, I have noticed that Mozilla Thunderbird calculates the total size of the resulting email as much larger than the files I have attached.
Here is a recent example: two images, one at 13 MB and the other at 3.6 MB, approximately 17 MB in total, and there were four lines of text. Mozilla Thunderbird then asked me if I really wanted to send an email with a total size of 22 MB.
Where is that difference in size coming from? Having 5 MB of text sounds like a bit much.
Kāpēc e-pasta izmērs ir lielāks par pievienotajiem failiem?
Atbilde
SuperUser atbalstītājs David Schwartz ir atbilde mums:
Your data was 17 MiB, there are 1024 KiB in a MiB, 1024 B in a KiB, and 8 bits in a byte. So that is a total of 142,606,336 bits.
Base 64 encoding encodes every 6 bits as a separate byte, so we need about 23,767,722 bytes. Dividing by 1024 twice gives us a total of 22.67 MiB. So that is where the 22 MiB comes from.
Email is a pretty old technology and does not assume an 8-bit clean pipe.
Vai kaut ko pievienot paskaidrojumam? Skatieties komentāros. Vēlaties lasīt citas atbildes no citiem tehnoloģiju savvy Stack Exchange lietotājiem? Šeit skatiet pilnu diskusiju pavedienu.