I have the following code which I have been using on a 188 byte file:
std::ifstream is("filename", std::ios::binary);
std::vector<uint8_t> buffer;
std::istream_iterator<uint8_t> i_input(is);
std::copy(i_input, std::istream_iterator<uint8_t>(),
std::back_inserter(buffer));
std::cout << buffer.size();
However it is only reading 186 bytes of the 188 bytes.
I have confirmed the file size in a hexeditor as well as with ls -al
.