Possibly both.  Use the hash for your original table, and setup a secondary table with hash as the key, and a zipped file as data.  But you'd need to have some provision for the inevitable collisions. 

On Tue, 14 Mar 2023, 09:47 Greg Keogh via ozdotnet, <ozdotnet@ozdotnet.com> wrote:
Hi Tom, I think this is a maths problem more than a SQL one. Good fun!

At first I thought "just MD5 hash the original string to 16 bytes and store the 32 hex chars".

Then you said you'd like to convert back, which sank my idea. The only option left is compression, but I'll bet it would be a miracle if all of your original strings could be roundtripped via 32 compressed characters.

Greg K
--
ozdotnet mailing list
To manage your subscription, access archives: https://codify.mailman3.com/