HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
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
16
enum
UT_CompressionType
17
{
18
UT_COMPRESSION_TYPE_NONE
= 0,
19
UT_COMPRESSION_TYPE_GZIP
,
20
UT_COMPRESSION_TYPE_BLOSC
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
32
UTcompressionTypeFromString
(
const
UT_String
&
string
)
33
{
34
if
(
string
==
"blosc"
)
35
{
36
return
UT_COMPRESSION_TYPE_BLOSC
;
37
}
38
else
if
(
string
==
"off"
||
string
==
"none"
)
39
{
40
return
UT_COMPRESSION_TYPE_NONE
;
41
}
42
else
if
(
string
==
"on"
||
string
==
"gzip"
)
43
{
44
return
UT_COMPRESSION_TYPE_GZIP
;
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.
51
return
UT_COMPRESSION_TYPE_BLOSC
;
52
}
53
}
54
55
56
#endif
/* UT_COMPRESSION_H_ */
UT_COMPRESSION_TYPE_GZIP
Definition:
UT_Compression.h:19
UT_String.h
UTcompressionTypeFromString
UT_CompressionType UTcompressionTypeFromString(const UT_String &string)
Definition:
UT_Compression.h:32
UT_CompressionType
UT_CompressionType
Definition:
UT_Compression.h:16
UT_String
Definition:
UT_String.h:73
UT_ASSERT
#define UT_ASSERT(ZZ)
Definition:
UT_Assert.h:156
UT_COMPRESSION_TYPE_BLOSC
Definition:
UT_Compression.h:20
UT_COMPRESSION_TYPE_NONE
Definition:
UT_Compression.h:18
UT
UT_Compression.h
Generated on Sat Dec 21 2024 02:49:07 for HDK by
1.8.6