-
Notifications
You must be signed in to change notification settings - Fork 78
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
[BUG] The low-level interface for batched deflate decompression can only work for the first block #82
Comments
Hi! Is there any way that you could provide a full example that reproduces the issue? From what you've provided, it's difficult to guess what the issue might be. We do have tests that test the Deflate compressor with multiple blocks, both compression and decompression, to ensure that the data is the same as it was before. A wild guess: How are you synchronizing before checking the results? |
Also, are you splitting the data into chunks before compression? If you take compressed data and arbitrarily split it into chunks afterward, that wouldn't work, because the chunks need to correspond with the chunks originally used for compression. |
Thanks for your early reply.
Therea are n(parameter "batch_size" in code) deflate blocks in total. The problem is that , when I handle all n blocks in
Attached are some deflate blocks at my use. Every file stores a deflate block at byte stream. This is the main code used in my program: I check the result compared with the CPU library. |
@Autumn1998 That is the right behavior actually. With deflate blocks, only the entropy decoding is independent across blocks, but LZ match copies create dependencies between blocks. For example, a match copy code of the second block can reference the result of the first block’s decompressed stream. This is probably why running serially works but running them concurrently does not. nvcomp’s deflate algorithm decompresses a whole deflate stream rather than just deflate blocks because of that LZ block dependency behavior. To use the batched decompression API, you would need to pass in multiple deflate streams and each stream may have one or more deflate blocks. But all that the nvcomp API cares about is how many streams there are. |
This issue has been labeled |
This issue has been labeled |
I am trying to decode some deflate blocks which is put on a byte stream. In fact, I preprocess the data to divide it into some blocks. For alignment with the start point, some blocks shift some bits to left. At the end of the block, if the data cannot be aligned, some zeros will be filled.
Then I convert these blocks to nvCOMP, but I get the wrong result (only the first block show the correct result) when invoking:
It seems that every parameter is correct because I got the correct result by:
I type the value of "device_statuses" and this two methods show the same results:
Only the last block's state is SUCCESS ?
All returned valued by functions are nvcompSuccess.
Thera are any possible reasons for this problem?
Thanks for you kindly attention.
by the way,
nvcompBatchedDeflateDecompressGetTempSize(batch_size, max_chunk_size, &decomp_temp_bytes)
always set 0 to "decomp_temp_bytes", it means deflate do not need buffer anymore?The text was updated successfully, but these errors were encountered: