HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_Compression.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_Compression.h ( UT Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef UT_COMPRESSION_H_
12 #define UT_COMPRESSION_H_
13 
14 #include "UT_String.h"
15 
17 {
21 };
22 
23 #define UT_BLOSC_BLOCKSIZE (1048576)
24 #define UT_BLOSC_TYPESIZE (sizeof(float))
25 #define UT_BLOSC_COMPRESSION_LEVEL (9)
26 
27 /// Converts the string we get from the parameter into an
28 /// enumeration that is used interally
29 /// The strange names for none and gzip (off and on) are for
30 /// backwards compatability with pervious compression parameter.
31 inline UT_CompressionType
33 {
34  if (string == "blosc")
35  {
37  }
38  else if (string == "off" || string == "none")
39  {
41  }
42  else if (string == "on" || string == "gzip")
43  {
45  }
46  else
47  {
48  UT_ASSERT(false && "Compression type not known. "
49  "You probably added the type to OBJ_Shared.C and not here.");
50  // If not assert then do default.
52  }
53 }
54 
55 
56 #endif /* UT_COMPRESSION_H_ */
UT_CompressionType UTcompressionTypeFromString(const UT_String &string)
UT_CompressionType
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156