Error Codes#

The C and C++ APIs report errors through the nvcompStatus_t enum (defined in nvcomp/shared_types.h). The low-level batched API returns this status directly and can also write per-chunk statuses to a device-side array. The C++ Manager API throws exceptions carrying the same status. This page lists each status with its likely cause and resolution.

Status

Value

Cause and Resolution

nvcompSuccess

0

Operation completed successfully. No action needed.

nvcompErrorInvalidValue

10

An argument was invalid (e.g., a null pointer where data is required, or an out-of-range option). Verify all pointers and option values passed to the API.

nvcompErrorNotSupported

11

The requested operation or configuration is not supported (e.g., an unsupported data type for the chosen format, or an option combination the chosen format does not implement). Check the format’s supported options in its header.

nvcompErrorCannotDecompress

12

The data could not be decompressed. Usually indicates corrupt or truncated input, or a format mismatch. Confirm the buffer was produced by the matching compressor and that input sizes are correct.

nvcompErrorBadChecksum

13

A stored checksum did not match the computed checksum, indicating data corruption. Re-acquire or re-transfer the data. See CRC32.

nvcompErrorCannotVerifyChecksums

14

Checksum verification was requested but could not be performed (e.g., checksums were not stored at compression time). Ensure checksums were enabled during compression.

nvcompErrorOutputBufferTooSmall

15

The provided output buffer cannot hold the result. Allocate the output buffer using the size returned by the configuration / GetMaxOutputChunkSize call.

nvcompErrorWrongHeaderLength

16

The compressed buffer header is malformed or the wrong length. Confirm the buffer is a valid nvCOMP stream and was not truncated.

nvcompErrorAlignment

17

An input, output, or temporary buffer did not meet the format’s alignment requirement. Align buffers to the value from the format’s GetRequiredAlignments call. (Allocations from cudaMalloc* implicitly satisfy alignment.)

nvcompErrorChunkSizeTooLarge

18

The chunk size exceeds the maximum supported by the format or hardware. Reduce the chunk size. For the Decompression Engine, see the chunk-size limits in Decompression Engine.

nvcompErrorCannotCompress

19

The data could not be compressed. Check the input pointers, sizes, and temporary workspace allocation.

nvcompErrorWrongInputLength

20

The input length is inconsistent with the requested operation (e.g., a size that is not a multiple of the data-type width). Verify input sizes.

nvcompErrorBatchSizeTooLarge

21

The number of chunks in the batch exceeds the supported maximum. Split the work into smaller batches.

nvcompErrorCudaError

1000

An underlying CUDA runtime call failed. Check cudaGetLastError and verify device state, available memory, and the CUDA stream. For additional debugging, run the program with the NVCOMP_LOG_FILE=<out_stream> environment variable.

nvcompErrorInternal

10000

An unexpected internal error occurred. Enable logging (NVCOMP_LOG_LEVEL) and report the issue with the log output.