Documentation

cdflib.getVarCompression

Information about compression used by variable

Syntax

[ctype,cparams,percent] = cdflib.getVarCompression(cdfId, varNum)

Description

[ctype,cparams,percent] = cdflib.getVarCompression(cdfId, varNum) returns information about the compression used for a variable in a Common Data Format (CDF) File.

Input Arguments

cdfId

Identifier of a CDF file, returned by a call to cdflib.create or cdflib.open.

Output Arguments

ctype

Text string identifying the type of compression. For a list of compression types, see cdflib.setCompression.

cparams

Any additional parameter required by the compression type.

percent

Numeric value indicating the level of compression, expressed as a percentage.

Examples

Open the example CDF file and check the compression settings of any variable.

cdfid = cdflib.open('example.cdf');

% Check the compression setting of any variable in the file
% The example checks the first variable (variable numbers are zero-based).
[ctype params percent] = cdflib.getVarCompression(cdfid,0)

ctype =

NO_COMPRESSION


params =

     []


percent =

   100

% Clean up
cdflib.close(cdfid);
clear cdfid

References

This function corresponds to the CDF library C API routine CDFgetzVarCompression.

To use this function, you must be familiar with the CDF C interface. Read the CDF documentation at the CDF Web site.

For copyright information, see the cdfcopyright.txt file.

Was this topic helpful?