The officially official Devuan Forum!

You are not logged in.

#1 2020-08-18 19:09:42

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Uploading file to email server - size vs. outgoing total discrepancy.

Hello:

I run Devuan ASCII 2.0 and my email client is Pegasus Mail 4.73 under Wine Debian 1.8.7-2.

~$ uname -a
Linux devuan 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64 GNU/Linux
~$ 

I keep tabs on my LAN with Conky using this configuration:

--- snip ---
NETWORK LAN
${hr 2}
IP address: $alignr ${addr eth0}
${downspeedgraph eth0}
Incoming: ${downspeed eth0}  /s $alignr total: ${totaldown eth0}
${upspeedgraph eth0}
Outgoing: ${upspeed eth0}  /s $alignr total: ${totalup eth0}
--- snip ---

The thing is that (had not noticed this before) I just sent an email with a 15.5MiB *.pdf document but Conky informs me there were a total of 30.5MiB transmitted. ie: outgoing.
That's almost 2X the original file size.

There was practically no incoming activity while the file was being uploaded so I don't think (?) it was retransmission of dropped/failed packets.

At the risk of revealing my ignorance, could anyone explain to me what is going on?

Thanks in advance.

A.

Offline

#2 2020-08-18 19:33:37

golinux
Administrator
Registered: 2016-11-25
Posts: 3,137  

Re: Uploading file to email server - size vs. outgoing total discrepancy.

From the Pegasus Mail and Linux Open Source page

The other major issue with Pegasus Mail is that it uses a proprietary third-party product as its core editor, and I would not be able to take that product with me into an Open Source environment. The same problems do not exist with Mercury, because I have written every line of the package myself, but with Pegasus Mail, the problem is significant.

No way of knowing what that proprietary core of Pegasus is doing.  Also perhaps some wine overhead?

Stat alert . . . my 2000th post!

Offline

#3 2020-08-18 19:48:10

Excalibur
Member
Registered: 2019-03-07
Posts: 15  

Re: Uploading file to email server - size vs. outgoing total discrepancy.

You will see a larger Email upload size than the actual data you are sending because the data is converted to base64 encoding. This has a tendency to inflate the size of your data quite considerably. Hence, the discrepancy.

Offline

#4 2020-08-18 19:52:58

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: Uploading file to email server - size vs. outgoing total discrepancy.

Hello:

golinux wrote:

... perhaps some wine overhead?

No idea, maybe with the CPU cycles.

Don't think it would affect transmitted data.

golinux wrote:

... my 2000th post!

Congrats !

A.

Last edited by Altoid (2020-08-18 19:57:29)

Offline

#5 2020-08-18 19:59:59

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: Uploading file to email server - size vs. outgoing total discrepancy.

Hello:

Excalibur wrote:

... will see a larger Email upload size than the actual data you are sending because the data is converted to base64 encoding.
This has a tendency to inflate the size of your data quite considerably. Hence, the discrepancy.

I see ...

This is just with Pegasus Mail or is it ...

Just read about it and it is probably common to all email clients or text to binary data conversions.
Like you say, base64 inflates the size of the data, but much less than decimal or hexadecimal:

Base-64 maps 3 bytes (8 x 3 = 24 bits) in 4 characters that span 6-bits (6 x 4 = 24 bits). The result looks something like "TWFuIGlzIGRpc3Rpb...". Therefore the bloating is only a mere 4/3 = 1.3333333 times the original.

https://stackoverflow.com/a/201536

Still, 15.5Mib x 1.3 = 20.15MiB, not 30.5MiB ...

What could be causing the other 10.35MiB worth of bloat?

Could it be that I am not sending a text file but *.pdf file, with all its complexities? ie: symbols, compression, etc. and the file is 15.5Mib 'on-disk'.

Thanks for your input.

A.

Last edited by Altoid (2020-08-18 20:17:41)

Offline

#6 2020-08-19 12:49:16

Excalibur
Member
Registered: 2019-03-07
Posts: 15  

Re: Uploading file to email server - size vs. outgoing total discrepancy.

Yes, it is as you say, that you are sending PDF files, which could contain images of various sorts etc. This would affect the efficiency of the base64 encoding mechanism.

Offline

#7 2020-08-19 13:26:11

Altoid
Member
Registered: 2017-05-07
Posts: 1,415  

Re: Uploading file to email server - size vs. outgoing total discrepancy.

Hello:

Excalibur wrote:

... as you say ...
... contain images of various sorts ...
... would affect the efficiency of the base64 encoding ...

Quite so, the document's physical surface is roughly 50% magazine quality colour photos.

Learnt something new this week.  =^)
Thanks a lot for your input.

Cheers,

A.

Offline

Board footer