MCPcopy Create free account
hub / github.com/dank/rlapi / decodeBuildID

Function decodeBuildID

buildid.go:3–9  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

1package rlapi
2
3func decodeBuildID(s string) int32 {
4 buf := make([]byte, 0, len(s)*2)
5 for _, r := range s {
6 buf = append(buf, byte(r), byte(r>>8))
7 }
8 return crc32(buf, 0)
9}
10
11// crc32 computes the non-reflected (big-endian) CRC-32
12func crc32(data []byte, seed uint32) int32 {

Callers 4

NewPsyNetFunction · 0.85
NewPsyNetWithLoggerFunction · 0.85
SetVersionMethod · 0.85
TestDecodeBuildIDFunction · 0.85

Calls 1

crc32Function · 0.85

Tested by 1

TestDecodeBuildIDFunction · 0.68