Check if current data stream is Gzip encoded.
Created
August 31, 2015 12:46
-
-
Save isawrub/7ca1d29e95f769f437c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static bool IsGZip(byte[] arr) | |
| { | |
| return arr.Length >= 2 && arr[0] == 31 && arr[1] == 139; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment