| 20 | } |
| 21 | |
| 22 | static void write16(std::ostream& out, uint16_t value) { |
| 23 | char a[2] = {(char)(value>>0), (char)(value>>8)}; |
| 24 | out.write(a, sizeof(a)); |
| 25 | } |
| 26 | static void write32(std::ostream& out, uint32_t value) { |
| 27 | char a[4] = {(char)(value>>0), (char)(value>>8), (char)(value>>16), (char)(value>>24)}; |
| 28 | out.write(a, sizeof(a)); |