Skip to content

Instantly share code, notes, and snippets.

View sebringj's full-sized avatar
💭
Shet yer Shtatus

Jason Sebring sebringj

💭
Shet yer Shtatus
View GitHub Profile
@sebringj
sebringj / GuidShortener.ts
Created April 19, 2024 20:52
GuidShortener
class GuidShortener {
public static guidToBase95(guid: string): string {
const bigInt = this.hexToBigInt(guid);
let base95String = this.bigIntToBase95(bigInt);
// Pad the result to ensure it's exactly 20 characters long
while (base95String.length < 20) {
base95String = ' ' + base95String; // Using space to pad for simplicity
}