Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Zlib
提交
b9ae6f00
T
Third Party Zlib
项目概览
OpenHarmony
/
Third Party Zlib
1 年多 前同步成功
通知
16
Star
112
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Zlib
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b9ae6f00
编写于
12月 31, 2016
作者:
M
Mark Adler
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add crc32_z() and adler32_z() functions with size_t lengths.
上级
61b91f27
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
8 deletion
+38
-8
adler32.c
adler32.c
+11
-2
crc32.c
crc32.c
+15
-6
zlib.h
zlib.h
+12
-0
未找到文件。
adler32.c
浏览文件 @
b9ae6f00
...
...
@@ -60,10 +60,10 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
#endif
/* ========================================================================= */
uLong
ZEXPORT
adler32
(
adler
,
buf
,
len
)
uLong
ZEXPORT
adler32
_z
(
adler
,
buf
,
len
)
uLong
adler
;
const
Bytef
*
buf
;
uIn
t
len
;
z_size_
t
len
;
{
unsigned
long
sum2
;
unsigned
n
;
...
...
@@ -130,6 +130,15 @@ uLong ZEXPORT adler32(adler, buf, len)
return
adler
|
(
sum2
<<
16
);
}
/* ========================================================================= */
uLong
ZEXPORT
adler32
(
adler
,
buf
,
len
)
uLong
adler
;
const
Bytef
*
buf
;
uInt
len
;
{
return
adler32_z
(
adler
,
buf
,
len
);
}
/* ========================================================================= */
local
uLong
adler32_combine_
(
adler1
,
adler2
,
len2
)
uLong
adler1
;
...
...
crc32.c
浏览文件 @
b9ae6f00
...
...
@@ -36,9 +36,9 @@
#endif
#ifdef BYFOUR
local
unsigned
long
crc32_little
OF
((
unsigned
long
,
const
unsigned
char
FAR
*
,
unsigned
));
const
unsigned
char
FAR
*
,
z_size_t
));
local
unsigned
long
crc32_big
OF
((
unsigned
long
,
const
unsigned
char
FAR
*
,
unsigned
));
const
unsigned
char
FAR
*
,
z_size_t
));
# define TBLS 8
#else
# define TBLS 1
...
...
@@ -199,10 +199,10 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
/* ========================================================================= */
unsigned
long
ZEXPORT
crc32
(
crc
,
buf
,
len
)
unsigned
long
ZEXPORT
crc32
_z
(
crc
,
buf
,
len
)
unsigned
long
crc
;
const
unsigned
char
FAR
*
buf
;
uIn
t
len
;
z_size_
t
len
;
{
if
(
buf
==
Z_NULL
)
return
0UL
;
...
...
@@ -233,6 +233,15 @@ unsigned long ZEXPORT crc32(crc, buf, len)
return
crc
^
0xffffffffUL
;
}
/* ========================================================================= */
unsigned
long
ZEXPORT
crc32
(
crc
,
buf
,
len
)
unsigned
long
crc
;
const
unsigned
char
FAR
*
buf
;
uInt
len
;
{
return
crc32_z
(
crc
,
buf
,
len
);
}
#ifdef BYFOUR
/*
...
...
@@ -257,7 +266,7 @@ unsigned long ZEXPORT crc32(crc, buf, len)
local
unsigned
long
crc32_little
(
crc
,
buf
,
len
)
unsigned
long
crc
;
const
unsigned
char
FAR
*
buf
;
unsigned
len
;
z_size_t
len
;
{
register
z_crc_t
c
;
register
const
z_crc_t
FAR
*
buf4
;
...
...
@@ -297,7 +306,7 @@ local unsigned long crc32_little(crc, buf, len)
local
unsigned
long
crc32_big
(
crc
,
buf
,
len
)
unsigned
long
crc
;
const
unsigned
char
FAR
*
buf
;
unsigned
len
;
z_size_t
len
;
{
register
z_crc_t
c
;
register
const
z_crc_t
FAR
*
buf4
;
...
...
zlib.h
浏览文件 @
b9ae6f00
...
...
@@ -1702,6 +1702,12 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
if (adler != original_adler) error();
*/
ZEXTERN
uLong
ZEXPORT
adler32_z
OF
((
uLong
adler
,
const
Bytef
*
buf
,
z_size_t
len
));
/*
Same as adler32(), but with a size_t length.
*/
/*
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
z_off_t len2));
...
...
@@ -1731,6 +1737,12 @@ ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
if (crc != original_crc) error();
*/
ZEXTERN
uLong
ZEXPORT
crc32_z
OF
((
uLong
adler
,
const
Bytef
*
buf
,
z_size_t
len
));
/*
Same as crc32(), but with a size_t length.
*/
/*
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录