zhuzhurk commented on a change in pull request #16314:
URL: https://github.com/apache/flink/pull/16314#discussion_r676263785
##########
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:
Thanks for the updates.
Given that the compression will not be invoked for many times and the
compression time is relatively short, I think it's fine to choose the most
common one.
--
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]