c++ - finding whether the body contains gzipped data -
i have program wherein searches reply curl request specific strings. gzipped data. there way find whether reply text or gzipped format? header contain gziipped,deflate header, not consistent. there way search string , find if gzipped?
you try taking @ first 2 bytes of data. gzipped data, they should 0x1f, 0x8b.
member header , trailer id1 (identification 1) id2 (identification 2) these have fixed values id1 = 31 (0x1f, \037), id2 = 139 (0x8b, \213), identify file being in gzip format.
Comments
Post a Comment