Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\decompress_bunzip2.c Create Date:2022-07-28 06:16:50
Last Modify:2020-03-15 22:49:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

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

Type:int

Parameter:

TypeParameterName
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  If Not bd Then Return RETVAL_OUT_OF_MEMORY
645  memset(bd, 0, sizeof(structbunzip_data))
647  ,*outbuf = inbuf
648  inbufCount = len
649  If (fill != NULL) Then fill = fill
651  Else fill = nofill
655  When i < 256 cycle
656  c = i << 24
657  When j cycle c = If c & 0x80000000 Then c << 1 ^ CRC32_POLY_BE Else 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  If i - BZh0 - 1 >= 9 Then Return RETVAL_NOT_BZIP_DATA
669  Intermediate buffer and its size (in bytes) = 100000 * (i - BZh0)
671  Intermediate buffer and its size (in bytes) = large_malloc(Intermediate buffer and its size (in bytes) * sizeof(int))
672  If Not Intermediate buffer and its size (in bytes) Then Return RETVAL_OUT_OF_MEMORY
674  Return Status return values
Caller
NameDescribe
bunzip2Example usage: decompress src_fd to dst_fd. (Stops at end of bzip2 data,not end of file.)