Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c51a69e4
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c51a69e4
编写于
7月 08, 2021
作者:
T
tickduan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove -w build option
上级
ed841113
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
14 addition
and
58 deletion
+14
-58
deps/SZ/CMakeLists.txt
deps/SZ/CMakeLists.txt
+1
-1
deps/SZ/sz/include/ByteToolkit.h
deps/SZ/sz/include/ByteToolkit.h
+0
-4
deps/SZ/sz/src/ByteToolkit.c
deps/SZ/sz/src/ByteToolkit.c
+2
-29
deps/SZ/sz/src/CompressElement.c
deps/SZ/sz/src/CompressElement.c
+3
-2
deps/SZ/sz/src/TightDataPointStorageF.c
deps/SZ/sz/src/TightDataPointStorageF.c
+0
-3
deps/SZ/sz/src/callZlib.c
deps/SZ/sz/src/callZlib.c
+2
-1
deps/SZ/sz/src/dataCompression.c
deps/SZ/sz/src/dataCompression.c
+0
-1
deps/SZ/sz/src/iniparser.c
deps/SZ/sz/src/iniparser.c
+1
-1
deps/SZ/sz/src/sz.c
deps/SZ/sz/src/sz.c
+2
-3
deps/SZ/sz/src/sz_double.c
deps/SZ/sz/src/sz_double.c
+1
-7
deps/SZ/sz/src/sz_float.c
deps/SZ/sz/src/sz_float.c
+1
-4
deps/SZ/sz/src/szd_double.c
deps/SZ/sz/src/szd_double.c
+0
-1
deps/SZ/sz/src/td_sz.c
deps/SZ/sz/src/td_sz.c
+1
-1
未找到文件。
deps/SZ/CMakeLists.txt
浏览文件 @
c51a69e4
...
...
@@ -21,7 +21,7 @@ AUX_SOURCE_DIRECTORY(zstd/dictBuilder SRC8)
# archive
ADD_LIBRARY
(
SZ STATIC
${
SRC1
}
${
SRC2
}
${
SRC3
}
${
SRC4
}
${
SRC5
}
${
SRC6
}
${
SRC7
}
${
SRC8
}
)
SET_TARGET_PROPERTIES
(
SZ PROPERTIES COMPILE_FLAGS -w
)
#
SET_TARGET_PROPERTIES(SZ PROPERTIES COMPILE_FLAGS -w)
deps/SZ/sz/include/ByteToolkit.h
浏览文件 @
c51a69e4
...
...
@@ -45,10 +45,6 @@ unsigned char numberOfLeadingZeros_Int(int i);
unsigned
char
numberOfLeadingZeros_Long
(
long
i
);
unsigned
char
getLeadingNumbers_Int
(
int
v1
,
int
v2
);
unsigned
char
getLeadingNumbers_Long
(
long
v1
,
long
v2
);
short
bytesToShort
(
unsigned
char
*
bytes
);
void
shortToBytes
(
unsigned
char
*
b
,
short
value
);
int
bytesToInt
(
unsigned
char
*
bytes
);
long
bytesToLong
(
unsigned
char
*
bytes
);
float
bytesToFloat
(
unsigned
char
*
bytes
);
void
floatToBytes
(
unsigned
char
*
b
,
float
num
);
double
bytesToDouble
(
unsigned
char
*
bytes
);
...
...
deps/SZ/sz/src/ByteToolkit.c
浏览文件 @
c51a69e4
...
...
@@ -8,9 +8,11 @@
*/
#include <stdlib.h>
#include <string.h>
#include "sz.h"
#include "zlib.h"
inline
unsigned
short
bytesToUInt16_bigEndian
(
unsigned
char
*
bytes
)
{
int
temp
=
0
;
...
...
@@ -397,37 +399,8 @@ unsigned char getLeadingNumbers_Long(long v1, long v2)
return
(
unsigned
char
)
numberOfLeadingZeros_Long
(
v
);
}
/**
* By default, the endian type is OS endian type.
* */
short
bytesToShort
(
unsigned
char
*
bytes
)
{
lint16
buf
;
memcpy
(
buf
.
byte
,
bytes
,
2
);
return
buf
.
svalue
;
}
void
shortToBytes
(
unsigned
char
*
b
,
short
value
)
{
lint16
buf
;
buf
.
svalue
=
value
;
memcpy
(
b
,
buf
.
byte
,
2
);
}
int
bytesToInt
(
unsigned
char
*
bytes
)
{
lfloat
buf
;
memcpy
(
buf
.
byte
,
bytes
,
4
);
return
buf
.
ivalue
;
}
long
bytesToLong
(
unsigned
char
*
bytes
)
{
ldouble
buf
;
memcpy
(
buf
.
byte
,
bytes
,
8
);
return
buf
.
lvalue
;
}
//the byte to input is in the big-endian format
inline
float
bytesToFloat
(
unsigned
char
*
bytes
)
...
...
deps/SZ/sz/src/CompressElement.c
浏览文件 @
c51a69e4
...
...
@@ -13,8 +13,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sz.h>
#include <CompressElement.h>
#include <string.h>
#include "sz.h"
#include "CompressElement.h"
inline
short
computeGroupNum_float
(
float
value
)
...
...
deps/SZ/sz/src/TightDataPointStorageF.c
浏览文件 @
c51a69e4
...
...
@@ -206,10 +206,7 @@ void convertTDPStoBytes_float(TightDataPointStorageF* tdps, unsigned char* bytes
unsigned
char
exactLengthBytes
[
8
];
unsigned
char
exactMidBytesLength
[
8
];
unsigned
char
realPrecisionBytes
[
8
];
unsigned
char
medianValueBytes
[
4
];
unsigned
char
segment_sizeBytes
[
8
];
unsigned
char
max_quant_intervals_Bytes
[
4
];
// 1 version
...
...
deps/SZ/sz/src/callZlib.c
浏览文件 @
c51a69e4
...
...
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
#include <sz.h>
...
...
@@ -221,7 +222,7 @@ unsigned long zlib_compress5(unsigned char* data, unsigned long dataLength, unsi
return
ret
;
size_t
p_size
=
0
,
av_in
=
0
;
uLong
estCmpLen
=
deflateBound
(
&
strm
,
dataLength
);
deflateBound
(
&
strm
,
dataLength
);
//*compressBytes = (unsigned char*)malloc(sizeof(unsigned char)*estCmpLen); // comment by tickduan no need malloc
unsigned
char
*
out
=
compressBytes
;
...
...
deps/SZ/sz/src/dataCompression.c
浏览文件 @
c51a69e4
...
...
@@ -207,7 +207,6 @@ inline void compressSingleFloatValue(FloatValueCompressElement *vce, float oriVa
if
(
ignBitCount
<
0
)
ignBitCount
=
0
;
int
tmp_int
=
diffVal
.
ivalue
;
intToBytes_bigEndian
(
vce
->
curBytes
,
diffVal
.
ivalue
);
// truncate diff value tail bit with ignBitCount
...
...
deps/SZ/sz/src/iniparser.c
浏览文件 @
c51a69e4
...
...
@@ -659,7 +659,7 @@ dictionary * iniparser_load(const char * ininame)
char
line
[
ASCIILINESZ
+
1
]
;
char
section
[
ASCIILINESZ
+
1
]
;
char
key
[
ASCIILINESZ
+
1
]
;
char
tmp
[
ASCIILINESZ
+
1
]
;
char
tmp
[
2
*
ASCIILINESZ
+
2
]
;
char
val
[
ASCIILINESZ
+
1
]
;
int
last
=
0
;
...
...
deps/SZ/sz/src/sz.c
浏览文件 @
c51a69e4
...
...
@@ -90,14 +90,13 @@ int SZ_Init_Params(sz_params *params)
size_t
SZ_compress_args
(
int
dataType
,
void
*
data
,
size_t
r1
,
unsigned
char
*
outData
,
sz_params
*
params
)
{
size_t
outSize
=
0
;
int
status
;
if
(
dataType
==
SZ_FLOAT
)
{
status
=
SZ_compress_args_float
((
float
*
)
data
,
r1
,
outData
,
&
outSize
,
params
);
SZ_compress_args_float
((
float
*
)
data
,
r1
,
outData
,
&
outSize
,
params
);
}
else
if
(
dataType
==
SZ_DOUBLE
)
{
status
=
SZ_compress_args_double
((
double
*
)
data
,
r1
,
outData
,
&
outSize
,
params
);
SZ_compress_args_double
((
double
*
)
data
,
r1
,
outData
,
&
outSize
,
params
);
}
else
{
...
...
deps/SZ/sz/src/sz_double.c
浏览文件 @
c51a69e4
...
...
@@ -22,7 +22,6 @@
#include "szd_double.h"
#include "zlib.h"
#include "utility.h"
#include "sz_stats.h"
unsigned
char
*
SZ_skip_compress_double
(
double
*
data
,
size_t
dataLength
,
size_t
*
outSize
)
{
...
...
@@ -253,7 +252,6 @@ void SZ_compress_args_double_StoreOriData(double* oriData, size_t dataLength, un
bool
SZ_compress_args_double_NoCkRngeNoGzip_1D
(
unsigned
char
*
newByteData
,
double
*
oriData
,
size_t
dataLength
,
double
realPrecision
,
size_t
*
outSize
,
double
valueRangeSize
,
double
medianValue_d
)
{
char
compressionType
=
0
;
TightDataPointStorageD
*
tdps
=
NULL
;
tdps
=
SZ_compress_double_1D_MDQ
(
oriData
,
dataLength
,
realPrecision
,
valueRangeSize
,
medianValue_d
);
...
...
@@ -301,16 +299,12 @@ int SZ_compress_args_double(double *oriData, size_t r1, unsigned char* newByteDa
int
status
=
SZ_SUCCESS
;
size_t
dataLength
=
r1
;
double
valueRangeSize
=
0
,
medianValue
=
0
;
bool
positive
=
true
;
double
nearZero
=
0
.
0
;
// check at least elements count
if
(
dataLength
<=
MIN_NUM_OF_ELEMENTS
)
{
printf
(
"error, double input elements count=%d less than %d, so need not do compress.
\n
"
,
dataLength
,
MIN_NUM_OF_ELEMENTS
);
printf
(
"error, double input elements count=%
l
d less than %d, so need not do compress.
\n
"
,
dataLength
,
MIN_NUM_OF_ELEMENTS
);
return
SZ_LITTER_ELEMENT
;
}
...
...
deps/SZ/sz/src/sz_float.c
浏览文件 @
c51a69e4
...
...
@@ -306,14 +306,11 @@ int SZ_compress_args_float(float *oriData, size_t r1, unsigned char* newByteData
// check at least elements count
if
(
dataLength
<=
MIN_NUM_OF_ELEMENTS
)
{
printf
(
"error, input elements count=%d less than %d, so need not do compress.
\n
"
,
dataLength
,
MIN_NUM_OF_ELEMENTS
);
printf
(
"error, input elements count=%
l
d less than %d, so need not do compress.
\n
"
,
dataLength
,
MIN_NUM_OF_ELEMENTS
);
return
SZ_LITTER_ELEMENT
;
}
float
valueRangeSize
=
0
,
medianValue
=
0
;
unsigned
char
*
signs
=
NULL
;
bool
positive
=
true
;
float
nearZero
=
0
.
0
;
float
min
=
0
;
min
=
computeRangeSize_float
(
oriData
,
dataLength
,
&
valueRangeSize
,
&
medianValue
);
...
...
deps/SZ/sz/src/szd_double.c
浏览文件 @
c51a69e4
...
...
@@ -67,7 +67,6 @@ int SZ_decompress_args_double(double* newData, size_t r1, unsigned char* cmpByte
return
SZ_FORMAT_ERR
;
}
int
dim
=
r1
;
int
doubleSize
=
sizeof
(
double
);
if
(
tdps
->
isLossless
)
{
...
...
deps/SZ/sz/src/td_sz.c
浏览文件 @
c51a69e4
...
...
@@ -43,7 +43,7 @@ int tdszCompress(int type, const char * input, const int nelements, const char *
// check valid
sz_params
comp_params
=
*
confparams_cpr
;
size_t
outSize
=
SZ_compress_args
(
type
,
input
,
(
size_t
)
nelements
,
(
unsigned
char
*
)
output
,
&
comp_params
);
size_t
outSize
=
SZ_compress_args
(
type
,
(
void
*
)
input
,
(
size_t
)
nelements
,
(
unsigned
char
*
)
output
,
&
comp_params
);
return
(
int
)
outSize
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录