added desc and updated README
This commit is contained in:
parent
e57b0aadde
commit
f13e04ff85
2 changed files with 6 additions and 2 deletions
|
@ -2,7 +2,9 @@
|
|||
name = "icechip"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "A mostly true to spec Twitter Snowflake implementation, with multiple modes."
|
||||
repository = "https://git.cbax.dev/icechip"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
publish = true
|
||||
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
|
||||
A snowflake library that actually does what it is supposed to.
|
||||
|
||||
Adheres to the twitter specification, but also has an improved mode.
|
||||
(Mostly) adheres to the twitter specification, but also has an improved mode.
|
||||
|
||||
NOTE: Only enhanced and extended modes are available at this time. Twitter original spec is horridly painful to implement with generics, as it supports both u64 and i64 and ignores the sign bit completely in both modes. (essentially u63 and i64 modes).
|
||||
|
||||
## Twitter Specification
|
||||
| u64 or i64 | | | |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
| bits 0-40 | bits 41-51 | bits 52-62 | 63 |
|
||||
| 0-40 | 41-51 | 52-62 | 63 |
|
||||
| time since an epoch in ms | machine id | sequence number | sign |
|
||||
|
||||
## Enhanced Specification
|
||||
|
|
Loading…
Reference in a new issue