Created
June 29, 2015 03:03
-
-
Save seiflotfy/0f3111e2e5204c1c566a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (cf *CuckooFilter) getComponents(data []byte) (uint, uint, []byte) { | |
hash := cf.getHash(data) | |
f := hash[0:cf.fingerprintSize] | |
i1 := uint(binary.BigEndian.Uint32(hash)) | |
i2 := i1 ^ uint(binary.BigEndian.Uint32(cf.getHash(f))) | |
return i1, i2, f | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment