Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

cdflib.getCompression

Compression settings

Syntax

[ctype,cparms,cpercentage] = cdflib.getCompression(cdfId)

Description

[ctype,cparms,cpercentage] = cdflib.getCompression(cdfId) returns information about the compression settings of 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 specifying compression type, such as 'HUFF_COMPRESSION'. If the CDF does not use compression, the function returns the string 'NO_COMPRESSION'. For a list of supported compression types, see cdflib.setCompression.

cparms

The value of the parameter associated with the type of compression. For example, for the 'RLE_COMPRESSION' compression type, the parameter specifies the style of run-length encoding. For a list of parameters supported by each compression type, see cdflib.setCompression.

cpercentage

The rate of compression, expressed as a percentage.

Examples

Open the example CDF file and check the compression settings in the file.

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

[ctype, cparms, cpercentage] = cdflib.getCompression(cdfId)

ctype =

GZIP_COMPRESSION

cparms =

     7

cper =

    26

% Clean up
cdflib.close(cdfId)
clear cdfId

Related Examples

References

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

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

For copyright information, see the cdfcopyright.txt file.

Was this topic helpful?