42 auto numToRead = (
int) std::min (size, (
size_t) 0x70000000);
72 if (
read (temp, 2) == 2)
82 if (
read (temp, 2) == 2)
92 if (
read (temp, 4) == 4)
102 if (
read (temp, 4) == 4)
115 const int numBytes = (
sizeByte & 0x7f);
126 if (
read (bytes, numBytes) != numBytes)
130 return (
sizeByte >> 7) ? -num : num;
137 if (
read (n.asBytes, 8) == 8)
147 if (
read (n.asBytes, 8) == 8)
155 static_assert (
sizeof (
int32) ==
sizeof (
float),
"Union assumes float has the same size as an int32");
204 if (c == 0 || c ==
'\n')
226 return (
size_t)
mo.writeFromInputStream (*
this, numBytes);
233 return mo.toString();
static constexpr uint32 bigEndianInt(const void *bytes) noexcept
static constexpr uint32 littleEndianInt(const void *bytes) noexcept
static Type swapIfLittleEndian(Type value) noexcept
static constexpr uint16 bigEndianShort(const void *bytes) noexcept
static constexpr uint16 littleEndianShort(const void *bytes) noexcept
static Type swapIfBigEndian(Type value) noexcept
virtual bool writeByte(char byte)