anton-vinogradov commented on code in PR #13319:
URL: https://github.com/apache/ignite/pull/13319#discussion_r3580245624


##########
modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java:
##########
@@ -4064,33 +4066,20 @@ private <T> T unmarshalZip(byte[] zipBytes) throws 
Exception {
 
     /**
      * @param obj Object.
-     * @return Bytes.
+     * @return Zip-compressed marshalled bytes.
      * @throws IgniteCheckedException If failed.
      */
     byte[] marshalZip(Object obj) throws IgniteCheckedException {
         assert obj != null;
 
-        return zip(U.marshal(marsh, obj));
-    }
-
-    /**
-     * @param bytes Bytes to compress.
-     * @return Zip-compressed bytes.
-     */
-    private static byte[] zip(byte[] bytes) {
-        Deflater deflater = new Deflater();
-
-        deflater.setInput(bytes);
-        deflater.finish();
+        GridByteArrayOutputStream out = new GridByteArrayOutputStream();

Review Comment:
   Per our discussion — reverted the seed, keeping the default 
`GridByteArrayOutputStream` sizing. Since the uncompressed size isn't available 
in the streaming path, the seed could only be a fixed constant rather than 
proportional to the input, so a fixed 8 KB isn't clearly worth it. Reverted in 
3295ae266f2.



-- 
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