I'm trying to read in a .zip file that holds a compressed .txt file. How can I check for the magic number 0x00BC? Thanks.
Edit: Sorry, should have specified that I'm trying to do this in java.
I'm trying to read in a .zip file that holds a compressed .txt file. How can I check for the magic number 0x00BC? Thanks.
Edit: Sorry, should have specified that I'm trying to do this in java.
First two bytes from the ZIP file:
InputStream is = new FileInputStream(FILE NAME);
byte b1 = (byte)is.read();
byte b2 = (byte)is.read();
is.close();
First two bytes from the first compressed file:
InputStream is = new FileInputStream(FILE NAME);
ZipInputStream zis = new ZipInputStream(is);
zis.getNextEntry();
byte[] bytes = new byte[2];
zis.read(bytes, 0, 2);
zis.close();