package
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Jan 13, 2025
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
DistInt 计算两个Key之间的距离
参数:
- x: Key 第一个Key
- y: Key 第二个Key
返回值:
Equal 比较两个Key是否相等
参数:
- x: Key 第一个Key
- y: Key 第二个Key
返回值:
Key 是由Go字节切片支持的位向量
第一个字节最重要
每个字节中的第一位最不重要
ByteKey 将单个字节转换为Key
参数:
返回值:
BytesKey 将字节切片转换为Key
参数:
返回值:
KbucketIDToKey 将kbucket.ID转换为Key
参数:
- id: kbucket.ID kbucket的ID
返回值:
Xor 计算两个Key的异或值
参数:
- x: Key 第一个Key
- y: Key 第二个Key
返回值:
BitAt 获取指定偏移位置的位值
参数:
返回值:
BitString 返回Key的位表示,按重要性降序排列
返回值:
Source Files
¶
Click to show internal directories.
Click to hide internal directories.