ahawker / ulid

Universally Unique Lexicographically Sortable Identifier (ULID) in Python 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is it possible to reduce the size of the ID at the expense of less ULIDs per millisecond?

jsmedmar opened this issue · comments

Wondering if its possible to reduce the size of the ID at the expense of less ULIDs per millisecond?

I'm assuming you mean less than 128 bits? Changing that would break the spec. However, in a general sense, yes you could create identifier values that require less space by storing less time information, say at a second granularity instead of a millisecond like ulid specifies, since you wouldn't need 48-bits to store it. However, that would be a separate implementation is out of scope for this library.