NVIDIA / NVIDIA/CUDALibrarySamples
[BUG] The low-level interface for batched deflate decompression can only work for the first block
@naveenaero is already working on this.
Since Apr 29, 2026.
- Dominant language
- Cuda
- Stars
- 2.5k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
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:
nvcompStatus_t decomp_res = nvcompBatchedDeflateDecompressAsync(
device_compressed_ptrs,
device_compressed_bytes,
device_uncompressed_bytes,
device_actual_uncompressed_bytes,
batch_size,
device_decomp_temp,
decomp_temp_bytes,
device_uncompressed_ptrs,
device_statuses,
stream);
It seems that every parameter is correct because I got the correct result by:
for(int i = 0;i<batch_size;i++)
{
nvcompStatus_t decomp_res = nvcompBatchedDeflateDecompressAsync(
device_compressed_ptrs + i ,
device_compressed_bytes + i,
device_uncompressed_bytes + i,
device_actual_uncompressed_bytes + i,
1,
device_decomp_temp,
decomp_temp_bytes,
device_uncompressed_ptrs + i,
device_statuses + i,
stream);
}
I type the value of "device_statuses" and this two methods show the same results:
check the state of 0 => state:11
check the state of 1 => state:11
check the state of 2 => state:11
check the state of 3 => state:11
check the state of 4 => state:11
check the state of 5 => state:11
...
check the state of 256 => state:0
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.