public static final <T>T deserialize(final InputStream input,final Class<T> clazz) throws IOException, ReflectiveOperationException {
  Objects.requireNonNull(input,"The input stream is null");
  Objects.requireNonNull(input,"The class is null");
  final Externalizer<T,T> externalizer=of(clazz);
  try (final GZIPInputStream compressed=new GZIPInputStream(input)){
    try (final ObjectInputStream objected=new ObjectInputStream(compressed)){
      return externalizer.readObject(objected);
    }
   }
 }

public static final < T > T deserialize ( final InputStream input , final Class < T > clazz ) throws IOException , ReflectiveOperationException { Objects . requireNonNull ( input , "The input stream is null" ) ; Objects . requireNonNull ( input , "The class is null" ) ; final Externalizer < T , T > externalizer = of ( clazz ) ; try ( final GZIPInputStream compressed = new GZIPInputStream ( input ) ) { try ( final ObjectInputStream objected = new ObjectInputStream ( compressed ) ) { return externalizer . readObject ( objected ) ; } } }
deserializes an object from the specified stream . < p > the stream passed in is not closed within this method . this is the responsibility of your application .
