public final <T> T deserialize(String o, Class<T> targetType) throws SerializerException {
try {
ByteArrayInputStream bais = new ByteArrayInputStream(B64Code.decode(o));
return targetType.cast(read(gzip ? new GZIPInputStream(bais) : bais));
} catch (Exception e) {
throw new SerializerException("Error deserializing " + o + " : " + e.getMessage(), e);
}
}