Message compressor

One way to further reduce the size of the messages would be to add a step at the end of the message process.
One way would be through this algorithm below, which basically takes the already encrypted string, reducing the length of the string by half

in this test I achieved savings of 25% in the message size
about it I did a little demonstration

var a = 'a';
var z = 'z';
// Convertendo em hex
var a_hex = a.charCodeAt(0).toString(16)
console.log("a: ", a_hex)
var z_hex = z.charCodeAt(0).toString(16)
console.log("z: ", z_hex)
// Concat dos hex
var az_hex = a_hex+z_hex
// Tranformado em numero
var az_int = parseInt(az_hex, 16)
// Convertando hex em char
var res = String.fromCharCode(az_int)
// Converter char em hex
var res_hex = res.charCodeAt(0).toString(16)
console.log("char to hex: ",res_hex)
// Pega duas primeira letras do hex e tranforma em int
var a_char = parseInt(res_hex[0]+res_hex[1], 16)
// Pega duas ultimas letras do hex e tranforma em int
var z_char = parseInt(res_hex[2]+res_hex[3], 16)
// Tranforma cada numero em char junta numa string
var az_char = String.fromCharCode(a_char)+String.fromCharCode(z_char)
console.log("origem: ",az_char)

I answered in another thread:

I have looked at this option in the past, Thunderbird even supports yEnc for non-encrypted messages:

But overall I decided against it because of incompatibility to other clients. If we want to get rid of ASCII armoring (speaking about OpenPGP messages), we need a joint effort by developers of several email clients, including at least Thunderbird and K-9 Mail, but also KMail, Evolution, mutt etc.


Would OpenPGP people be interested in reducing the size?

You can join OpenPGP WG and see.

Quick search over their mailing list reveals related issues have been discussed several times:

yEnc was discussed in 2016: Archive

1 Like