MCPcopy
hub / github.com/minio/minio-go / extractUint32

Function extractUint32

api-select.go:715–722  ·  view source on GitHub ↗

extractUint32 extracts a 4 byte integer from the byte array.

(r io.Reader)

Source from the content-addressed store, hash-verified

713
714// extractUint32 extracts a 4 byte integer from the byte array.
715func extractUint32(r io.Reader) (uint32, error) {
716 buf := make([]byte, 4)
717 _, err := readFull(r, buf)
718 if err != nil {
719 return 0, err
720 }
721 return binary.BigEndian.Uint32(buf), nil
722}
723
724// extractUint16 extracts a 2 byte integer from the byte array.
725func extractUint16(r io.Reader) (uint16, error) {

Callers 2

processPreludeFunction · 0.85
checkCRCFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected