[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: limiting email sizes when sending files



>>>>> Andrew McGlashan <andrew.mcglashan@affinityvision.com.au> writes:
>>>>> Ivan Shmakov wrote:

 >> Huh?  Base64 has overhead of only 33.(3)%?

 > Won't that vary by file?

	I guess it won't.  Base64 sends each 6-bit of data as an ASCII
	character, which is (usually) represented by an octet.  This
	gives exactly 4 octets of output for every 3 octets of input:

(* 4 6) => 24
(* 3 8) => 24

	The only variation that Base64 has is that the output is padded
	to the 4-octet boundary (with up to two ='s), but the effects of
	this are negligible for the files of more than a few kiB long.

 > It's never going to be the same for every file.

	It's not unusual to compress the files before the Base64
	encoding is applied.  And indeed, the compression ratio may
	vary.

 > It's still alot of extra overhead, not just the extra data.

	Yes.

-- 
FSF associate member #7257


Reply to: