ahawker / ulid

Universally Unique Lexicographically Sortable Identifier (ULID) in Python 3
Apache License 2.0
695 stars 42 forks source link

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

Closed jsmedmar closed 5 years ago

jsmedmar commented 5 years ago

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

ahawker commented 5 years ago

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.