35 void ReadData(
size_t count,
void * data);
40 void ReadData(
size_t count, std::vector<uint8_t>& data,
size_t offset = 0);
45 void ReadData(std::vector<uint8_t>& data,
size_t offset = 0);
50 std::string
ReadData(
size_t count,
bool terminate_at_null =
false);
55 std::string
ReadASCIIZ(
size_t maximum = (
size_t)-1);
80 void Seek(offset_t offset);
85 void Skip(offset_t offset);
90 void SeekEnd(relative_offset_t offset = 0);
A helper class, encapsulating functionality needed to import binary data.
Definition reader.h:16
void Skip(offset_t offset)
Jump to a distance in the input stream.
Definition reader.cc:81
void Seek(offset_t offset)
Jump to a specific location in the input stream.
Definition reader.cc:75
uint64_t ReadSigned(size_t bytes, EndianType endiantype)
Read a signed word.
Definition reader.cc:63
void SeekEnd(relative_offset_t offset=0)
Jump to end of the input stream.
Definition reader.cc:87
EndianType endiantype
The default endianness of the binary format, used for reading multibyte numeric data.
Definition reader.h:21
std::istream * in
The input stream.
Definition reader.h:25
void ReadData(size_t count, void *data)
Read in a sequence of bytes.
Definition reader.cc:6
std::string ReadASCIIZ(size_t maximum=(size_t) -1)
Read a zero terminated ASCII string.
Definition reader.cc:40
offset_t Tell()
Retrieve the current location.
Definition reader.cc:93
uint64_t ReadUnsigned(size_t bytes, EndianType endiantype)
Read an unsigned word.
Definition reader.cc:51