This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} |