public static Object deserialize(String filename) {
		if (filename == null) {
			return null;
		}
		InputStream fis = null;
		ObjectInputStream in = null;
		Object obj = null;
		try {
			fis = new FileInputStream(filename);
			if (filename.endsWith(".gz")) {
				fis = new GZIPInputStream(fis);
			}
			in = new ObjectInputStream(fis);
			obj = in.readObject();
			in.close();
		} catch (IOException ex) {
			ex.printStackTrace();
		} catch (ClassNotFoundException ex) {
			ex.printStackTrace();
		}
		return obj;
	}