MCPcopy Create free account
hub / github.com/dgrr/http2 / BytesToUint24

Function BytesToUint24

http2utils/utils.go:25–30  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

23}
24
25func BytesToUint24(b []byte) uint32 {
26 _ = b[2] // bound checking
27 return uint32(b[0])<<16 |
28 uint32(b[1])<<8 |
29 uint32(b[2])
30}
31
32func AppendUint32Bytes(dst []byte, n uint32) []byte {
33 return append(dst, byte(n>>24), byte(n>>16), byte(n>>8), byte(n))

Callers 1

parseValuesMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected