-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
utils.hpp contains the following length check for is_compressed:
return size > 2 && ...
However, it only uses the first two bytes. I would vote that length check should be return size >= 2 && ...
This would allow me to do something like:
char gzipHeader[2];
file.read(gzipHeader, 2);
file.seekg(0, ios::beg); // rewind
if (gzip::is_compressed(gzipHeader, 2))
// do something...
Metadata
Metadata
Assignees
Labels
No labels