#pragma once

#include "shark_types.h"

void shark_encode_u16(shark_u8 *buff, shark_u16 value);
void shark_encode_u24(shark_u8 *buff, shark_u24 value);
void shark_encode_u32(shark_u8 *buff, shark_u32 value);
void shark_encode_u64(shark_u8 *buff, shark_u64 value);

shark_u16 shark_decode_u16(const shark_u8 *buff);
shark_u24 shark_decode_u24(const shark_u8 *buff);
shark_u32 shark_decode_u32(const shark_u8 *buff);
shark_u64 shark_decode_u64(const shark_u8 *buff);

static inline void shark_encode_u8(shark_u8 *buff, shark_u8 value)
{
	*buff = value;
}

static inline shark_u8 shark_decode_u8(const shark_u8 *buff)
{
	return *buff;
}

