Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(java): support meta compression by Zstd #1696

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wangjie-fourth
Copy link
Contributor

What does this PR do?

support meta compression by Zstd

Related issues

#1664

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

@wangjie-fourth
Copy link
Contributor Author

@chaokunyang hi, if there have anything need modify, please let me know.

@chaokunyang
Copy link
Collaborator

Seems the interface is pretty simple, could we use reflection instead, in such ways, users doesn't need to include another dependency

Comment on lines +37 to +38
byte[] decompressData = new byte[size];
System.arraycopy(data, offset, decompressData, 0, size);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
byte[] decompressData = new byte[size];
System.arraycopy(data, offset, decompressData, 0, size);
byte[] decompressData = Arrays.copyOfRange(data, offset, offset + size);

System.arraycopy(data, offset, decompressData, 0, size);

byte[] buffer = new byte[(int) Zstd.getFrameContentSize(decompressData)];
Zstd.decompress(buffer, decompressData);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems not used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants