Wolfram · Keys

Keys

3.0.0-rc.1 · 4c3e5023

Keys are USearch’s 128-bit identities, written as integers below 2¹²⁸ and crossing as sixteen bytes, most significant first. That is what IntegerDigits[key, 256, 16] renders and FromDigits[bytes, 256] reads back, so an identity crosses at full precision whether it started as a machine integer, a UUID, or a number too wide for either. An integer identity is the encoding of a number below 2⁶⁴, so it parks in the low eight bytes with the rest zeroed. A UUID is the number its hexadecimal digits spell:

uuid = FromDigits[StringDelete["5f9c2b71-8e4d-4a63-b2f1-0c7a9d3e6b58", "-"], 16];
DenseInsert[index, {uuid, 43}, rows];