public Archive(File file) throws IOException {
		// Initialize
		this.file = file;
		files = new HashMap<String, ArchiveFile>();
		if (!file.exists()) return;

		// Open the file to read
		RandomAccessFile raf = null;
		try {
			raf = new RandomAccessFile(file, "r");

			// Read the header
			int filecnt = changeEndianness(raf.readInt());
			List<Integer> offsets = new ArrayList<Integer>();

			// Read the offsets
			for (int i = 0; i < filecnt; i++) {
				int offset = changeEndianness(raf.readInt());
				if (offset == 0) {
					break;
				}
				offsets.add(offset);
			}

			// Read the file entries
			for (int i = 0; i < offsets.size(); i++) {
				raf.seek(offsets.get(i));

				ArchiveFile f = new ArchiveFile();
				f.size = changeEndianness(raf.readInt());
				int pathsize = changeEndianness(raf.readInt());
				byte[] path = new byte[pathsize];
				raf.read(path);
				f.filename = new String(path);
				f.offset = offsets.get(i) + 8 + pathsize;
				files.put(f.filename, f);
			}
		} finally {
			if (raf != null) {
				raf.close();
			}
		}
	}