Created
March 9, 2021 00:29
-
-
Save abhay8nitt/6e66aedc3736b548fae276971b900a4f to your computer and use it in GitHub Desktop.
This file contains 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
## Determine uncompressed size of GZIP file | |
info,_ :=f.Stat() | |
r4 := bufio.NewReader(f) | |
_size:= int(info.Size()) | |
x,_:=r4.Discard(_size-4) | |
b4,_:=r4.ReadByte() | |
b3,_:=r4.ReadByte() | |
b2,_:=r4.ReadByte() | |
b1,_:=r4.ReadByte() | |
val:= (int(b1) << 24) | (int(b2) << 16) + (int(b3) << 8) + int(b4) | |
fmt.Println(val) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment