News for hackers. Stuff that matters.
Re:What is the space overhead of Base64 encoding? by BeeOnRope on Wednesday January 30, 2019 @08:42PM (#19041498)
Well they will never be equivalent since the compressor has to learn and encode the set of 64 characters used, and passing along that information has some cost. In practice, that cost is either sending the probabilities up front in a compressor that does that, or the ramp up cost of using the wrong probabilities for a compressor that just uses the existing frequencies as the implicit probabilities.

Otherwise we could pass along some information "for free" in any base-64 encoding scheme by choosing some set of 64 characters (there are lots of choices and whichever set we choose encodes a message), encoding the original message with it, and then compressing it back to the original size - leading to "infinite" compression.

Other reasons base64 can't be compressed exactly back to its original form include the presence of arbitrary newlines, and trailing padding characters.

This doesn't matter in practice for compressing one large base64 encoded file where the overheads go to approximately zero, but for compressing a larger non-base64 file (e.g., HTML file) that contains embedded base64 chunks it is actually a real problem the compressor has to delimit the base64 encoded regions and communicate the new symbol probabilities somehow for each region.

Re:What is the space overhead of Base64 encoding? by jnordwick on Friday February 01, 2019 @12:03PM (#19055906)
paging BeeOnRope. Can you email me? address in profile. you answered a question i had a while ago and wanted to follow up. thx