summaryrefslogtreecommitdiffhomepage
path: root/byteorder.h
blob: 56555b732165afc8635db42a0132b79e891c8384 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include <cstdint>
#include <vector>

namespace endian {

 std::vector<uint8_t> to_little(uint16_t value);
 uint16_t from_little16(const std::vector<uint8_t>& value);

 std::vector<uint8_t> to_little(uint32_t value);
 uint32_t from_little32(const std::vector<uint8_t>& value);

 std::vector<uint8_t> to_little(uint64_t value);
 uint64_t from_little64(const std::vector<uint8_t>& value);

}