Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public bool IsGZip(string filename)
- {
- byte[] buf = null;
- try
- {
- buf = File.ReadAllBytes(filename);
- }
- catch
- {
- return false;
- }
- if (buf.Length < 4) return false;
- if ((buf[0] == 0x1F) && (buf[1] == 0x8B) &&
- (buf[2] == 0x08) && (buf[3] == 0x00))
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement