Quick test that gzipped NRRD has correct data length

NrrdTestDataLength(infile, defaultReturnVal = TRUE)

Arguments

infile

Input/output files

defaultReturnVal

The value to return when file cannot be checked

Value

A logical indicating if the check passed

Details

Tests integrity of a nrrd file by checking that the data block is as long as it should be. For a gzip file, it checks that the last 4 bytes encode the length of the uncompressed data. This says nothing about the contents but does ensure that the file has not been truncated which is much the most common problem.

See also

NrrdTestIntegrity which is more comprehensive but much slower