Created
March 9, 2021 00:31
-
-
Save abhay8nitt/b012f5b939d59f877c1a81b2320872f0 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
### Uncompressed size of a compressed zip file | |
RandomAccessFile raf = new RandomAccessFile("test.gz", "r"); | |
raf.seek(raf.length() - 4); | |
int b4 = raf.read(); | |
int b3 = raf.read(); | |
int b2 = raf.read(); | |
int b1 = raf.read(); | |
int val = (b1 << 24) | (b2 << 16) + (b3 << 8) + b4; | |
System.out.println(val); | |
raf.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment