zhuzhurk commented on a change in pull request #16314:
URL: https://github.com/apache/flink/pull/16314#discussion_r672907148



##########
File path: flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java
##########
@@ -618,6 +620,18 @@ public static void writeObjectToConfig(Object o, 
Configuration config, String ke
         }
     }
 
+    public static <T> T uncompressAndDeserializeObject(byte[] bytes, 
ClassLoader cl)
+            throws IOException, ClassNotFoundException {
+        return uncompressAndDeserializeObject(bytes, cl, false);
+    }
+
+    public static <T> T uncompressAndDeserializeObject(
+            byte[] bytes, ClassLoader cl, boolean isFailureTolerant)
+            throws IOException, ClassNotFoundException {
+        return deserializeObject(
+                new InflaterInputStream(new ByteArrayInputStream(bytes)), cl, 
isFailureTolerant);

Review comment:
       Have ever considered other `InflaterInputStream`, e.g. `GZIPInputStream`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to