(s string)
| 1 | package rlapi |
| 2 | |
| 3 | func 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 |
| 12 | func crc32(data []byte, seed uint32) int32 { |