permanent-satori-hole/include/pack.h

43 lines
1.2 KiB
C
Raw Normal View History

2023-12-27 00:35:22 +00:00
#ifndef H_SATORI_PACK
#define H_SATORI_PACK
#include <stdint.h>
void sat_pack_i16be(uint8_t *buffer, int16_t num);
void sat_pack_u16be(uint8_t *buffer, uint16_t num);
void sat_pack_i32be(uint8_t *buffer, int32_t num);
void sat_pack_u32be(uint8_t *buffer, uint32_t num);
void sat_pack_i64be(uint8_t *buffer, int64_t num);
void sat_pack_u64be(uint8_t *buffer, uint64_t num);
void sat_pack_i16le(uint8_t *buffer, int16_t num);
void sat_pack_u16le(uint8_t *buffer, uint16_t num);
void sat_pack_i32le(uint8_t *buffer, int32_t num);
void sat_pack_u32le(uint8_t *buffer, uint32_t num);
void sat_pack_i64le(uint8_t *buffer, int64_t num);
void sat_pack_u64le(uint8_t *buffer, uint64_t num);
int16_t sat_unpack_i16be(uint8_t *buffer);
uint16_t sat_unpack_u16be(uint8_t *buffer);
int32_t sat_unpack_i32be(uint8_t *buffer);
uint32_t sat_unpack_u32be(uint8_t *buffer);
int64_t sat_unpack_i64be(uint8_t *buffer);
uint64_t sat_unpack_u64be(uint8_t *buffer);
int16_t sat_unpack_i16le(uint8_t *buffer);
uint16_t sat_unpack_u16le(uint8_t *buffer);
int32_t sat_unpack_i32le(uint8_t *buffer);
uint32_t sat_unpack_u32le(uint8_t *buffer);
int64_t sat_unpack_i64le(uint8_t *buffer);
uint64_t sat_unpack_u64le(uint8_t *buffer);
#endif // H_SATORI_PACK