mastodon.me.uk is one of the many independent Mastodon servers you can use to participate in the fediverse.
Open, user-supported, corporation-free social media for the UK.

Administered by:

Server stats:

486
active users

James Smith 💾

Anyone know a standard encoding scheme for binary data to alphabetical strings using only lowercase consonants?

I want to generate non-numeric IDs but avoid making real words, so cutting out the vowels seems the the best approach.

I could just make something up like convert it to hex, and then make b=0, c=1, d=2, f=3, g=4 etc, but is there anything standard?

EDIT: We have a winner, @pbarker pointed me at sqids.org which will do the job nicely!

sqids.orgSqids (formerly Hashids) · Generate Short Unique IDsSqids is a lightweight, customizable library that converts numbers into short, URL-safe IDs. It's a flexible and collision-free solution for generating unique IDs.

@Floppy a previous website I worked on had article ids that included both forward slashes and the prefix "art".

These were sometimes encoded into url parameters.

Some customers wondered why their urls contained farts: `...%2fart...`

😆

and this is why I'm throwing away vowels :)

@Floppy but remember… the fly pygmy lynx in the crypt has syzygy rhythm

@Floppy tsktsk… hmm… cwtch!