blob: 8f1493532c33caf859fcfe42522d8f08fa0d1165 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include "tinyff/common.h"
#include "common.h"
inline uint32_t get_big_endian(const uint8_t *buffer) {
return (uint32_t)(buffer[0] << 24) |
(uint32_t)(buffer[1] << 16) |
(uint32_t)(buffer[2] << 8) |
(uint32_t)(buffer[3]);
}
inline uint32_t get_little_endian(const uint8_t *buffer)
{
return (uint32_t)(buffer[0]) |
(uint32_t)(buffer[1] << 8) |
(uint32_t)(buffer[2] << 16) |
(uint32_t)(buffer[3] << 24);
}
|