Packs (the 8 least significant bits of) 8 'unsigned char's into a 'uint_fast64_t' in "big endian" order. * * Precondition: unsigned char b[8] */
| 17 | * Precondition: unsigned char b[8] |
| 18 | */ |
| 19 | static inline uint_fast64_t ReadBE64(const unsigned char* b) { |
| 20 | return (uint_fast64_t)(b[0] & 0xff) << 56 |
| 21 | | (uint_fast64_t)(b[1] & 0xff) << 48 |
| 22 | | (uint_fast64_t)(b[2] & 0xff) << 40 |
| 23 | | (uint_fast64_t)(b[3] & 0xff) << 32 |
| 24 | | (uint_fast64_t)(b[4] & 0xff) << 24 |
| 25 | | (uint_fast64_t)(b[5] & 0xff) << 16 |
| 26 | | (uint_fast64_t)(b[6] & 0xff) << 8 |
| 27 | | (uint_fast64_t)(b[7] & 0xff); |
| 28 | } |
| 29 | |
| 30 | /* Packs (the 8 least significant bits of) 4 'unsigned char's into a 'uint32_t' in "big endian" order. |
| 31 | * |