Packs (the 8 least significant bits of) 4 'unsigned char's into a 'uint32_t' in "big endian" order. * * Precondition: unsigned char b[4] */
| 32 | * Precondition: unsigned char b[4] |
| 33 | */ |
| 34 | static inline uint32_t ReadBE32(const unsigned char* b) { |
| 35 | return (uint32_t)(b[0]) << 24 |
| 36 | | (uint32_t)(b[1] & 0xff) << 16 |
| 37 | | (uint32_t)(b[2] & 0xff) << 8 |
| 38 | | (uint32_t)(b[3] & 0xff); |
| 39 | } |
| 40 | |
| 41 | /* Unpacks the 8 least significant bytes from a 'uint_fast64_t' into an 'unsigned char' array in "big endian" order. |
| 42 | * |
no outgoing calls
no test coverage detected