函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\decompress_bunzip2.c Create Date:2022-07-27 07:14:09
Last Modify:2020-03-15 22:49:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Allocate the structure, read file header. If in_fd ==-1, inbuf must containa complete bunzip file (len bytes long). If in_fd!=-1, inbuf and len areignored, and data is read from file handle into temporary buffer.

函数原型:static int __attribute__((__section__(".init.text"))) __attribute__((__cold__))start_bunzip(struct bunzip_data **bdp, void *inbuf, long len, long (*fill)(void *, unsigned long ))

返回类型:int

参数:

类型参数名称
struct bunzip_data **bdp
void *inbuf
longlen
long (*fill
634  BZh0等于'B'左移24位的值加'Z'左移16位的值加'h'左移8位的值加'0'
639  i等于sizeof(structbunzip_data)
642  bd等于bdp等于Use defines rather than static inline in order to avoid spurious* warnings when not needed (indeed large_malloc / large_free are not* needed by inflate (i)
643  如果非bd则返回:RETVAL_OUT_OF_MEMORY
645  memset(bd, 0, sizeof(structbunzip_data))
647  ,*outbuf等于inbuf
648  inbufCount等于len
649  如果(fill != NULL)则fill等于fill
651  否则fill等于nofill
655 i小于256循环
656  c等于i左移24位
657 j循环c等于如果c按位与0x80000000则c左移1位按位异或CRC32_POLY_BE否则c左移1位
659  The CRC values stored in the block header and calculated from thedata [i]等于c
663  i等于Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian
664  如果iBZh0减1大于等于9则返回:RETVAL_NOT_BZIP_DATA
669  Intermediate buffer and its size (in bytes) 等于100000乘iBZh0的差
671  Intermediate buffer and its size (in bytes) 等于large_malloc(Intermediate buffer and its size (in bytes) * sizeof(int))
672  如果非Intermediate buffer and its size (in bytes) 则返回:RETVAL_OUT_OF_MEMORY
674  返回:Status return values
调用者
名称描述
bunzip2Example usage: decompress src_fd to dst_fd. (Stops at end of bzip2 data,not end of file.)