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

BitShuffle#shuffle does not allow to pass arbitrary type sizes (even if the underlying library does support that) #298

Open
foosmate opened this issue Nov 10, 2021 · 1 comment

Comments

@foosmate
Copy link

foosmate commented Nov 10, 2021

For data encoding, sometimes integers with intermediate sizes (e.g. of 3 or 5 bytes) are used (e.g. to reduce bandwith). These arrays currently cannot be passed to the external BitShuffle library with snappy-java, because in snappy-java the typesize is predefined as constant. Since the external library actually supports arbitrary type sizes this is an unnecessary restriction.

How to fix:

Would be great to have the following methods:

public static int shuffle(ByteBuffer input, int typeSize, ByteBuffer shuffled) throws IOException {
    ...
}

public static int unshuffle(ByteBuffer shuffled, int typeSize, ByteBuffer output) throws IOException {
    ...
}
@xerial
Copy link
Owner

xerial commented May 23, 2023

Related #443

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

No branches or pull requests

2 participants