函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\zlib_inflate\inffast.c Create Date:2022-07-27 07:55:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Decode literal, length, and distance codes and write out the resultingliteral and match bytes until either not enough input or output isavailable, an end-of-block is encountered, or a data error is encountered

函数原型:void inflate_fast(z_streamp strm, unsigned start)

返回类型:void

参数:

类型参数名称
z_streampstrm>avail_in >= 6
unsignedstart
117  state等于 not visible by applications
118  in等于 next input byte OFF
119  last等于in number of bytes available at next_in 减5
120  out等于 next output byte should be put there OFF
121  beg等于outstart remaining free space at next_out
122  end等于out remaining free space at next_out 减257
126  wsize等于window size or zero if not using window
127  whave等于valid bytes in the window
128  write等于window write index
129  window等于allocated sliding window, if needed
130  hold等于put bit accumulator
131  bits等于umber of bits in "in"
132  lcode等于starting table for length/literal codes
133  dcode等于starting table for distance codes
134  lmask等于1U左移dex bits for lencode 位的值减1
135  dmask等于1U左移dex bits for distcode 位的值减1
139  循环
140  如果bits小于15则
141  hold加等于PUP(in)左移bits
142  bits加等于8
143  hold加等于PUP(in)左移bits
144  bits加等于8
146  this等于lcode[hold & lmask]
147  dolen :
148  op等于s in this part of the code
149  hold右移等于op
150  bits减等于op
151  op等于peration, extra bits, table bits
152  如果op恒等于0则
155  否则如果op按位与16则
157  op与等于15
158  如果op
159  如果bits小于op
160  hold加等于PUP(in)左移bits
161  bits加等于8
163  len加等于hold按位与1U左移op位的值减1
164  hold右移等于op
165  bits减等于op
167  如果bits小于15则
168  hold加等于PUP(in)左移bits
169  bits加等于8
170  hold加等于PUP(in)左移bits
171  bits加等于8
173  this等于dcode[hold & dmask]
174  dodist :
176  hold右移等于op
177  bits减等于op
179  如果op按位与16则
181  op与等于15
182  如果bits小于op
183  hold加等于PUP(in)左移bits
184  bits加等于8
185  如果bits小于op
186  hold加等于PUP(in)左移bits
187  bits加等于8
190  dist加等于hold按位与1U左移op位的值减1
198  hold右移等于op
199  bits减等于op
200  op等于outbeg
201  如果dist大于op
202  op等于distop
203  如果op大于whave
208  from等于windowOFF
209  如果write恒等于0则
210  from加等于wsizeop
211  如果op小于len
212  len减等于op
213  循环
214  PUP(out)等于PUP(from)
215 op先自减循环
216  from等于outdist
219  否则如果write小于op
220  from加等于wsizewriteop
221  op减等于write
222  如果op小于len
223  len减等于op
224  循环
225  PUP(out)等于PUP(from)
226 op先自减循环
227  from等于windowOFF
228  如果write小于len
229  op等于write
230  len减等于op
231  循环
232  PUP(out)等于PUP(from)
233 op先自减循环
234  from等于outdist
238  否则
239  from加等于writeop
240  如果op小于len
241  len减等于op
242  循环
243  PUP(out)等于PUP(from)
244 op先自减循环
245  from等于outdist
248 len大于2循环
249  PUP(out)等于PUP(from)
250  PUP(out)等于PUP(from)
251  PUP(out)等于PUP(from)
252  len减等于3
254  如果len
255  PUP(out)等于PUP(from)
256  如果len大于1则PUP(out)等于PUP(from)
260  否则
264  from等于outdist
267  如果非out减1加OFF按位与1的值则
268  PUP(out)等于PUP(from)
269  len自减
271  sout等于outOFF
272  如果dist大于2则
275  sfrom等于fromOFF
276  loops等于len右移1位
277  循环
281  PUP(sout)等于UP_UNALIGNED(sfrom)
283 loops先自减循环
284  out等于soutOFF
285  from等于sfromOFF
286  否则
289  pat16等于*sout减1加OFF的和
290  如果dist恒等于1则
293  us等于pat16
294  b[0]等于b[1]
295  pat16等于us
297  loops等于len右移1位
298  循环
299  PUP(sout)等于pat16
300 loops先自减循环
301  out等于soutOFF
303  如果len按位与1则PUP(out)等于PUP(from)
307  否则如果op按位与64的值恒等于0则
308  this等于dcode[ffset in table or code value + (hold & ((1U << op) - 1))]
309  转到:dodist
311  否则
317  否则如果op按位与64的值恒等于0则
318  this等于lcode[ffset in table or code value + (hold & ((1U << op) - 1))]
319  转到:dolen
321  否则如果op按位与32则
323  退出
325  否则
326  last error message, NULL if no error 等于"invalid literal/length code"
328  退出
330 in小于lastout小于end循环
333  len等于bits右移3位
334  in减等于len
335  bits减等于len左移3位
336  hold与等于1U左移bits位的值减1
339  next input byte 等于inOFF
340  next output byte should be put there 等于outOFF
341  number of bytes available at next_in 等于如果in小于last则5加lastin否则5减inlast
342  remaining free space at next_out 等于如果out小于end则257加endout否则257减outend
344  put bit accumulator 等于hold
345  umber of bits in "in" 等于bits
346  返回
调用者
名称描述
zlib_inflatelate() uses a state machine to process as much input data and generate asmuch output data as possible before returning