@SuppressWarnings("unused")
	protected Entry readEntry(InputStream in) throws IOException {
		Entry entry = new Entry();

		byte temp[] = new byte[4];

		in.read(temp);
		if (!new String(temp).equals("File")) throw new IOException("FileFormat error :: " + new String(temp));
		int entryLength = (int)read_s64(in);

		in.read(temp);
		if (!new String(temp).equals("info")) throw new IOException("FileFormat error");
		int infoLength = (int)read_s64(in);

		entry.encrypted = read_s32(in) != 0;
		int origSize = (int)read_s64(in);
		int compSize = (int)read_s64(in);

		int filenameL = (int)readLE(in, 2);
		//System.err.println(origSize + " " + compSize + " " + new String(temp) + " " + filenameL);
		if (infoLength != filenameL*2+22) throw new IOException("FileFormat error");

		char filename[] = new char[filenameL];
		for (int n = 0; n < filenameL; n++) {
			filename[n] = (char)readLE(in, 2);
		}
		entry.file = new String(filename);

		in.read(temp);
		if (!new String(temp).equals("segm")) throw new IOException("FileFormat error");
		int numSegments = ((int)read_s64(in)) / 28;
		entry.segments = new Segment[numSegments];
		for (int n = 0; n < numSegments; n++) {
			Segment s = new Segment();
			s.compressed = read_s32(in) != 0;
			s.offset = (int)read_s64(in);
			s.origSize = (int)read_s64(in);
			s.compSize = (int)read_s64(in);

			entry.segments[n] = s;
		}

		in.read(temp);
		//System.err.println(new String(temp));
		if (read_s64(in) != 4) throw new IOException("FileFormat error");
		int adler = read_s32(in);

		return entry;
	}