NVIDIA / NVIDIA/CUDALibrarySamples

Merging two independently compressed deflate chunks in a PNG compatible zstream

Open
#313 2 comments 0 reactions 1 assignee View on GitHub

@naveenaero is already working on this.

Since Apr 29, 2026.

nvCOMP question
Dominant language
Cuda
Stars
2.5k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

I am working on compression bitmap images in png. The input data are quite large, therefore I need to divide the image in chunks, after that I use the deflate compression in nvcomp. Given 2 independently compressed chunks with deflate, I want to connect them. In zlib a similar feature is achieved handling correctly the padding in the last byte, and adding an uncompressed block of size 0 (0x00 0x00 0xFF 0xFF). Is there a similar functionality in nvcomp? At least, can I retrieve the exact number of bits (not bytes) without padding of the compressed block, because in this way I can handle myself the BFINAL|BTYPE header.

The idea is to join in this way multiple compressed chunks, using both GPU speed, avoiding the 64KB limit for the chunk size, and creating a valid zstream that I can store myself in a valid png. I need to work on native Windows (therefore I cannot use DALI, because it is for Windows).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.