且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查文件是否gzip的COM pressed?

更新时间:2023-11-25 16:20:52

有一个神奇的数字在文件的开头。刚看完前两个字节,并检查它们是否等于 0x1f8b

There is a magic number at the beginning of the file. Just read the first two bytes and check if they are equal to 0x1f8b.