c++ - Compress short fixed length string (52 characters) down to less than 40 -
i tried googling algorithm compress/encrypt shor fixed size string 52 characters down 40 can't seem find any.
target strings random alphanumeric [a-z0-9] e.g "m5ks07vhn2x42jcy1pfhe1zzgi2xubdfakqbepfb7ch4secxhjxl"
i have tried huffman , smaz (https://github.com/antirez/smaz") , both inflated size of original string.
does know algorithm such purpose?
for a-z0-9, simplest encoding encode 6 bits per character (which potentially allow more. 52 characters 52 * 8 bits, compressed string 52 * 6 = 39 bytes.
edit: more complex system store using radix-50 format used dec in pdp-11 , similar systems, store 3 characters in 16 bits, using multiplier of 40 each character. used system when student , school had pdp-11 running rsts/e.
Comments
Post a Comment