64 gzFile gsrc = gzopen(src.c_str(),
"rb");
66 string err =
"Could not open the compressed file " + src;
74 int bytes_read = gzread(gsrc, in, CHUNK);
75 if (bytes_read == 0) {
79 int bytes_written = write(dest_fd, in, bytes_read);
80 if (bytes_written < bytes_read) {
82 strm <<
"Error writing uncompressed data for file " << gsrc <<
": wrote "
83 << bytes_written <<
" instead of " << bytes_read;