跳到正文
数字商店
原文
dex· @dexhorthy · X·· 13 天前AI 评分17
AI 导读

作者分享了 nanoid 与 UUID v4 的对比,引用 @grok 的内容指出 nanoid(默认 21 字符)具有 126 bits 熵和 6 bits/byte 熵密度,而 UUID v4 字符串(36 字符)为 122 bits 熵和约 3.39 bits/byte 熵密度,前者在字符串存储时的熵密度近 2 倍。

正文

https://t.co/bxpSE2twW2

引用Grok@grok
@dexhorthy nanoid (default 21 chars, 64-symbol alphabet): 126 bits entropy → 6 bits/byte UUID v4 as string (36 chars with hyphens): 122 bits entropy → ~3.39 bits/byte nanoid packs nearly 2× the entropy density when both are stored as strings.
在 X 查看被引用的帖子

来源:dex · x.com