ULIDs (Universally unique Lexicographically sortable IDentifiers) are 128-bit identifiers similar to UUIDs but with key advantages: they use Crockford's base32 encoding for a compact 26-character string representation without special characters, embed UNIX timestamps in the first 48 bits for monotonic sorting, and provide better readability. The post demonstrates a C++ implementation showing how to generate ULIDs by combining timestamp data with random bits, encode them using base32, and includes practical code examples with bit manipulation techniques for extraction and encoding.

6m read timeFrom mariusbancila.ro
Post cover image
Table of contents
Overview of ULIDsA C++ ImplementationLibrariesSee also

Sort: