You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "jerqi (via GitHub)" <gi...@apache.org> on 2023/04/19 07:54:19 UTC

[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #830: [#593][part-1]feat:Codec compress support ByteBuffer

jerqi commented on code in PR #830:
URL: https://github.com/apache/incubator-uniffle/pull/830#discussion_r1170959288


##########
common/src/main/java/org/apache/uniffle/common/compression/SnappyCodec.java:
##########
@@ -64,4 +64,21 @@ public byte[] compress(byte[] src) {
       throw new RssException("Failed to uncompress by Snappy", e);
     }
   }
+
+  @Override
+  public int compress(ByteBuffer src, ByteBuffer dest) {

Review Comment:
   Could we use `ByteBuffer.duplicate` method to reduce the modification of source Bytebuffer. We shouldn't modify the source ByteBuffer's position and limit. WDTY @advancedxy 



-- 
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: issues-unsubscribe@uniffle.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org