函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\zutil.h Create Date:2022-07-27 07:13:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Update a running Adler-32 checksum with the bytes buf[0..len-1] andreturn the updated checksum. If buf is NULL, this function returnsthe required initial value for the checksum.An Adler-32 checksum is almost as reliable as a CRC32 but can be computed

函数原型:static inline uLong zlib_adler32(uLong adler, const Byte *buf, uInt len)

返回类型:uLong

参数:

类型参数名称
uLongadler
const Byte *buf
uIntlen
82  s1等于adler按位与0xffff
83  s2等于adler右移16位按位与0xffff
86  如果(buf == NULL)则返回:1L
88 len大于0循环
89  k等于如果len小于NMAXlen否则NMAX
90  len减等于k
91 k大于等于16循环
93  buf加等于16
94  k减等于16
96  如果k不等于0则循环
97  s1加等于buf自加
98  s2加等于s1
99 k先自减循环
100  s1取模等于largest prime smaller than 65536
101  s2取模等于largest prime smaller than 65536
103  返回:s2左移16位按位或s1
调用者
名称描述
zlib_inflatelate() uses a state machine to process as much input data and generate asmuch output data as possible before returning
read_buf