string str;
str.resize(frame.size);
off_t offset = 0;
while (offset < frame.size) {
int ret = pread(fd, &str[offset], frame.size - offset, frame.offset + offset);
if (ret <= 0) {
string str;
str.resize(frame.size);
off_t offset = 0;
while (offset < frame.size) {
int ret = pread(fd, &str[offset], frame.size - offset, frame.offset + offset);
if (ret <= 0) {