| Contents | Index |
cdflib.setCompression(cdfId,ctype,cparms)
cdflib.setCompression(cdfId,ctype,cparms) specifies compression settings of a Common Data Format (CDF) file.
This function sets the compression for the CDF file itself, not that of any variables in the file.
Create a CDF file and set the compression setting of the file. To run this example, your current folder must be writable.
cdfId = cdflib.create('your_file.cdf');
% Determine the file's default compression setting
[ctype, cparms, cpercent ] = cdflib.getCompression(cdfId)
ctype =
NO_COMPRESSION
cparms =
[]
cpercent =
100
% Specify new compression setting
cdflib.setCompression(cdfId,'HUFF_COMPRESSION');
% Check the file's compression setting.
[ctype, cparms, cpercent ] = cdflib.getCompression(cdfId)
ctype =
HUFF_COMPRESSION
cparms =
OPTIMAL_ENCODING_TREES
cpercent =
0
% Clean up
cdflib.delete(cdfId)
clear cdfIdThis function corresponds to the CDF library C API routine CDFsetCompression. To use these functions, 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.
cdflib.getCompression | cdflib.getConstantValue
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |