Class CompressorControlNameComputer

java.lang.Object
nom.tam.fits.compression.provider.CompressorControlNameComputer

public class CompressorControlNameComputer extends Object

(for internal use) Finds the name of the appropriate tile compressor class name given the algorithm used to quantize and compress the tile and the type of data the tile contains.

The name of the class is built of four parts:
  • the capitalized simple name of the base type of the elements in the tile (like Int, Long etc.);
  • if a known quantize algorithm is used, the word "Quant", the word "Unknown" if the quantize algorithm is not recognized, nothing (i.e. the empty string) if it is null;
  • the short name of the compression algorithm to use (Rice, PLIO, Gzip etc.) or the word "Unknown" if the algorithm is not supported;
  • the suffix "Compressor"

Following exception to above rules exist:

  • If the primitive type is double or float, the quantize algorithm is ignored (as if it were specified as null)
See the associated unit tests for concrete examples.
  • Constructor Details

    • CompressorControlNameComputer

      public CompressorControlNameComputer()
  • Method Details

    • createCompressorClassName

      public String createCompressorClassName(String quantAlgorithm, String compressionAlgorithm, Class<?> baseType)