函数逻辑报告 |
Source Code:lib\zlib_inflate\inflate.c |
Create Date:2022-07-27 07:55:16 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:late() uses a state machine to process as much input data and generate asmuch output data as possible before returning
函数原型:int zlib_inflate(z_streamp strm, int flush)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| z_streamp | strm | >next_out, given the space available and the provided input--the effect |
| int | flush |
| 332 | static const unsigned short order[19] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15} |
| 344 | 如果current inflate mode 恒等于 waiting for type bits, including last-flag bit 则current inflate mode 等于 same, but skip check to exit inflate on new block |
| 349 | 循环switch current inflate mode |
| 352 | 如果 0 true for zlib, bit 1 true for gzip 恒等于0则 |
| 357 | 如果Return the low n bits of the bit accumulator (n < 16) (8)左移8位的值加hold右移8位的值的和取模31则 |
| 359 | last error message, NULL if no error 等于"incorrect header check" |
| 361 | 退出 |
| 364 | last error message, NULL if no error 等于"unknown compression method" |
| 366 | 退出 |
| 370 | 如果len大于log base 2 of requested window size 则 |
| 371 | last error message, NULL if no error 等于"invalid window size" |
| 373 | 退出 |
| 375 | zlib header max distance (INFLATE_STRICT) 等于1U左移len位 |
| 377 | current inflate mode 等于如果hold按位与0x200则 waiting for dictionary check value 否则 waiting for type bits, including last-flag bit |
| 379 | 退出 |
| 387 | 如果rue if dictionary provided 恒等于0则 |
| 389 | 返回:Z_NEED_DICT |
| 395 | 如果flush恒等于Only for inflate at present 则转到:inf_leave |
| 398 | 如果rue if processing last block 则 |
| 401 | 退出 |
| 413 | 退出 |
| 418 | last error message, NULL if no error 等于"invalid block type" |
| 422 | 退出 |
| 427 | last error message, NULL if no error 等于"invalid stored block lengths" |
| 429 | 退出 |
| 431 | literal or length of data to copy 等于hold按位与0xffff |
| 460 | 如果umber of length code lengths 大于286或umber of distance code lengths 大于30则 |
| 461 | last error message, NULL if no error 等于"too many length or distance symbols" |
| 463 | 退出 |
| 466 | umber of code lengths in lens[] 等于0 |
| 475 | 当umber of code lengths in lens[] 小于19循环 |
| 479 | dex bits for lencode 等于7 |
| 480 | ret等于zlib_inflate_table(CODES, mporary storage for code lengths , 19, & (xt available space in codes[] ), & (dex bits for lencode ), work area for code table building ) |
| 482 | 如果ret则 |
| 483 | last error message, NULL if no error 等于"invalid code lengths set" |
| 485 | 退出 |
| 487 | umber of code lengths in lens[] 等于0 |
| 492 | 循环 |
| 493 | this等于starting table for length/literal codes [Return the low n bits of the bit accumulator (n < 16) (dex bits for lencode )] |
| 494 | 如果s in this part of the code 小于等于bits则退出 |
| 497 | 如果ffset in table or code value 小于16则 |
| 502 | 否则 |
| 503 | 如果ffset in table or code value 恒等于16则 |
| 504 | Assure that there are at least n bits in the bit accumulator. If there isnot enough available input to do that, then return from inflate(). (s in this part of the code + 2) |
| 506 | 如果umber of code lengths in lens[] 恒等于0则 |
| 507 | last error message, NULL if no error 等于"invalid bit length repeat" |
| 509 | 退出 |
| 515 | 否则如果ffset in table or code value 恒等于17则 |
| 516 | Assure that there are at least n bits in the bit accumulator. If there isnot enough available input to do that, then return from inflate(). (s in this part of the code + 3) |
| 518 | len等于0 |
| 522 | 否则 |
| 523 | Assure that there are at least n bits in the bit accumulator. If there isnot enough available input to do that, then return from inflate(). (s in this part of the code + 7) |
| 525 | len等于0 |
| 530 | last error message, NULL if no error 等于"invalid bit length repeat" |
| 532 | 退出 |
| 545 | dex bits for lencode 等于9 |
| 546 | ret等于zlib_inflate_table(LENS, mporary storage for code lengths , umber of length code lengths , & (xt available space in codes[] ), & (dex bits for lencode ), work area for code table building ) |
| 548 | 如果ret则 |
| 549 | last error message, NULL if no error 等于"invalid literal/lengths set" |
| 551 | 退出 |
| 554 | dex bits for distcode 等于6 |
| 557 | 如果ret则 |
| 558 | last error message, NULL if no error 等于"invalid distances set" |
| 560 | 退出 |
| 569 | 退出 |
| 571 | 循环 |
| 572 | this等于starting table for length/literal codes [Return the low n bits of the bit accumulator (n < 16) (dex bits for lencode )] |
| 573 | 如果s in this part of the code 小于等于bits则退出 |
| 576 | 如果peration, extra bits, table bits 且peration, extra bits, table bits 按位与0xf0的值恒等于0则 |
| 577 | last = this |
| 578 | 循环 |
| 588 | 如果peration, extra bits, table bits 恒等于0则 |
| 592 | 如果peration, extra bits, table bits 按位与32则 |
| 596 | 如果peration, extra bits, table bits 按位与64则 |
| 597 | last error message, NULL if no error 等于"invalid literal/length code" |
| 599 | 退出 |
| 601 | xtra bits needed 等于peration, extra bits, table bits 按位与15 |
| 605 | 如果xtra bits needed 则 |
| 613 | 循环 |
| 614 | this等于starting table for distance codes [Return the low n bits of the bit accumulator (n < 16) (dex bits for distcode )] |
| 615 | 如果s in this part of the code 小于等于bits则退出 |
| 618 | 如果peration, extra bits, table bits 按位与0xf0的值恒等于0则 |
| 619 | last = this |
| 620 | 循环 |
| 629 | 如果peration, extra bits, table bits 按位与64则 |
| 630 | last error message, NULL if no error 等于"invalid distance code" |
| 632 | 退出 |
| 635 | xtra bits needed 等于peration, extra bits, table bits 按位与15 |
| 639 | 如果xtra bits needed 则 |
| 640 | Assure that there are at least n bits in the bit accumulator. If there isnot enough available input to do that, then return from inflate(). (xtra bits needed ) |
| 652 | last error message, NULL if no error 等于"invalid distance too far back" |
| 654 | 退出 |
| 661 | 如果distance back to copy string from 大于copy则 |
| 663 | 如果copy大于window write index 则 |
| 664 | copy减等于window write index |
| 671 | 否则 |
| 678 | 循环 |
| 682 | 退出 |
| 690 | 如果 0 true for zlib, bit 1 true for gzip 则 |
| 695 | 如果out则 adler32 value of the uncompressed data 等于protected copy of check value 等于check function to use adler32() for zlib or crc32() for gzip (protected copy of check value , put - out, out) |
| 701 | last error message, NULL if no error 等于"incorrect data check" |
| 703 | 退出 |
| 710 | ret等于Z_STREAM_END |
| 711 | 转到:inf_leave |
| 713 | ret等于Z_DATA_ERROR |
| 714 | 转到:inf_leave |
| 716 | 返回:Z_MEM_ERROR |
| 717 | 当:current inflate mode 恒等于SYNC |
| 718 | 默认 |
| 719 | 返回:Z_STREAM_ERROR |
| 727 | inf_leave : |
| 741 | best guess about the data type: ascii or binary 等于umber of bits in "in" 加如果rue if processing last block 则64否则0加如果current inflate mode 恒等于 waiting for type bits, including last-flag bit 则128否则0 |
| 748 | 如果in恒等于0且out恒等于0或flush恒等于Z_FINISH的值且ret恒等于Allowed flush values; see deflate() and inflate() below for details 则ret等于Z_BUF_ERROR |
| 751 | 返回:ret |
| 名称 | 描述 |
|---|---|
| zlib_inflate_blob | Utility function: initialize zlib, unpack binary blob, clean up zlib,* return len or negative error code. |
| __gunzip | Included from initramfs et al code |
| deflate_decompress |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |