writing meta logs is working

This commit is contained in:
Chris Lu
2020-03-30 01:19:33 -07:00
parent 9dc0b1df8f
commit 50a5018b7f
12 changed files with 618 additions and 152 deletions

View File

@@ -74,3 +74,20 @@ func HashStringToLong(dir string) (v int64) {
return
}
func HashToInt32(data []byte) (v int32) {
h := md5.New()
h.Write(data)
b := h.Sum(nil)
v += int32(b[0])
v <<= 8
v += int32(b[1])
v <<= 8
v += int32(b[2])
v <<= 8
v += int32(b[3])
return
}