{
Base64 base64Codec = new Base64();
ByteArrayInputStream decodedStream = new ByteArrayInputStream( base64Codec.decode( s.getBytes(ZIP_CHARSET) ) );
InputStream unzippedStream = new GZIPInputStream(decodedStream);
ObjectInputStream ois = new MyFacesObjectInputStream(unzippedStream);
Object obj = ois.readObject();
ois.close();
unzippedStream.close();
decodedStream.close();
return obj;
}