Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Layout grid for UUIDv7 with Crockford's Base32 encoding (for a new RFC Draft) #100

Closed
sergeyprokhorenko opened this issue Apr 9, 2022 · 1 comment

Comments

@sergeyprokhorenko
Copy link

sergeyprokhorenko commented Apr 9, 2022

0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
│T T T T T T T T T T T T T T T T T T T T│T T T T T T T T T T T T-T T T T T T T T│
├───────┴─┬─────┴───┬───┴─────┬─┴───────┼───────┴─┬─────┴───┬───┴─────┬─┴───────┤
│T T T T T T T T-E E E E V C C C C C C C│C C C C-A A C C C C C C C C C C C C U U┤
├───────┴─┬─────┴───┬───┴─────┬─┴───────┼───────┴─┬─────┴───┬───┴─────┬─┴───────┤
│U U U U U U U U U U U U U U U U R R R R│R R R R R R R R R R R R R R R R R R R R│
├───────┴─┬─────┴───┬───┴─────┬─┴───────┼───────┴─┬─────┴───┬───┴─────┬─┴───────┤
│R R R R R R R R-Z Z M M M M M M M M M M│M M M M M M M M M M M M M M M M M M M M│
└───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┴───────┘

T - timestamp incremented on counter overflow
E - version
A - variant
V - zero initialized counter (counter overflow protection) or randomly initialized counter
C - randomly initialized counter
U - randomly initialized counter and/or node identifier (N) and/or pseudo-random data
R - pseudo-random data
Z - zero bits for Crockford's Base32 encoding or application specific metadata attached to UUID (optional, detachable and any length)
M - application specific metadata attached to UUID (optional, detachable and any length)

The length of the segments is subject to further discussion.

The numbering of bits from zero confuses me, but it is kept for compatibility.

@sergeyprokhorenko
Copy link
Author

Closed in favor of uuid6/new-uuid-encoding-techniques-ietf-draft#1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant