We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I am trying to port ZstdDecompressor to C# and I have hard time understanding how ZstdDecompressor.getDecompressedSize should work.
If I modify testDecompressWithOutputPaddingAndChecksum() to following
testDecompressWithOutputPaddingAndChecksum()
public void testDecompressWithOutputPaddingAndChecksum() throws IOException { int padding = 1021; byte[] compressed = Resources.toByteArray(getClass().getClassLoader().getResource("data/zstd/with-checksum.zst")); byte[] uncompressed = Resources.toByteArray(getClass().getClassLoader().getResource("data/zstd/with-checksum")); byte[] output = new byte[uncompressed.length + padding * 2]; // pre + post padding int decompressedSize = getDecompressor().decompress(compressed, 0, compressed.length, output, padding, output.length); long decompressedSize2 = ZstdDecompressor.getDecompressedSize(compressed, 0, compressed.length); assertEquals(decompressedSize2, 11359, "Should be equal"); assertByteArraysEqual(uncompressed, 0, uncompressed.length, output, padding, decompressedSize); }
then the decompressedSize2 has value -1 and test fails. Am I missing something in here?
decompressedSize2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I am trying to port ZstdDecompressor to C# and I have hard time understanding how ZstdDecompressor.getDecompressedSize should work.
If I modify
testDecompressWithOutputPaddingAndChecksum()
to followingthen the
decompressedSize2
has value -1 and test fails. Am I missing something in here?The text was updated successfully, but these errors were encountered: