#include#include #include #include #include using namespace std; int main(int argc, char* argv[]) { ifstream file(argv[1], ios::binary); SeekableReadStream stream(&file); uint16_t value = stream.readUint16BE(); cout << "Value: " << value << endl; return 0; }
#includeIn this example, a binary file is opened and read using the SeekableReadStream readUint16BE function to read multiple 16-bit unsigned integers in big-endian byte order. The values are stored in a vector and then displayed on the console. Package library: Symphony OCR Library#include #include #include #include "SeekableReadStream.h" using namespace std; int main() { ifstream file("test.bin", ios::binary); SeekableReadStream stream(&file); vector values; uint16_t value; while (!stream.eof()) { value = stream.readUint16BE(); values.push_back(value); } for (auto& v : values) cout << v << endl; return 0; }