cdflib.setVarReservePercent
Specify reserve percentage for variable
Syntax
cdflib.setVarReservePercent(cdfId,varNum,percent)
Description
cdflib.setVarReservePercent(cdfId,varNum,percent)
specifies the compression reserve percentage for a variable in a Common
Data Format (CDF) file.
Input Arguments
|
Identifier of a CDF file, returned by a call to |
|
Numeric value identifying a variable in the file. Variable identifiers (variable numbers) are zero-based. |
|
Numeric value specifying the amount of extra space to allocate
for a compressed variable, expressed as a percentage. You can specify
values between |
Examples
Create a CDF, create a variable, set the compression of the variable, and then set the reserve percent for the variable. To run this example, you must be in a writable folder.
cdfId = cdflib.create("your_file.cdf"); % Create a variable in the file varNum = cdflib.createVar(cdfId,"Time","cdf_int1",1,[],true,[]); % Set the compression of the variable cdflib.setVarCompression(cdfId,varNum,"GZIP_COMPRESSION",8) % Set the compression reserver percentage cdflib.setVarReservePercent(cdfId,varNum,80) %Clean up cdflib.delete(cdfId) clear cdfId
More About
Tips
This function corresponds to the CDF library C API routine
CDFsetzVarReservePercent
.To use this function, you must be familiar with the CDF C interface. You can access the CDF documentation at the CDF website.