Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashBytesWithCryptoFunc ¶
func HashString ¶
func HashString(s string) *hashData
Types ¶
type Dictionary ¶
Dictionary records the mapping between hash value and string.
func (*Dictionary) AddToDict ¶
func (d *Dictionary) AddToDict(entry string) (uint64, error)
AddToDict converts a string in a hash value and add this pair of string and hash to the local Dictionary. It returns the hash value of the string and errors out if there exist hash collision or hash convection error.
func (*Dictionary) LookupDict ¶
func (d *Dictionary) LookupDict(hash uint64) (string, error)
LookupDict returns string that maps to the hash value. The function returns error if hash value does not exist in the Dictionary or the mapped string is empty.
type SyncType ¶
type SyncType string
const ( // string reconciliation RCDS SyncType = "RecursiveContentDependentShingling" // set reconciliation IBLT SyncType = "InvertibleBloomLookupTable" CPI SyncType = "CharacteristicPolynomialInterpolation" InterCPI SyncType = "InteractiveCharacteristicPolynomialInterpolation" FullSync SyncType = "FullSync" // set difference estimation StrataEst SyncType = "StrataEstimation" )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.