extractUint32 extracts a 4 byte integer from the byte array.
(r io.Reader)
| 713 | |
| 714 | // extractUint32 extracts a 4 byte integer from the byte array. |
| 715 | func 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. |
| 725 | func extractUint16(r io.Reader) (uint16, error) { |
no outgoing calls
no test coverage detected