Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian

Proto:static unsigned int __attribute__((__section__(".init.text"))) __attribute__((__cold__))get_bits(struct bunzip_data *bd, char bits_wanted)

Type:unsigned int

Parameter:

TypeParameterName
struct bunzip_data *bd
charbits_wanted
118  bits = 0
123  When inbufBitCount < bits_wanted cycle
126  If , outbufPos == inbufCount Then
127  If -zero if we have IO error Then Return 0
130  If inbufCount <= 0 Then
134  , outbufPos = 0
137  If inbufBitCount >= 24 Then
138  bits = inbufBits & (1 << inbufBitCount) - 1
140  bits <<= bits_wanted
141  inbufBitCount = 0
144  inbufBits = inbufBits << 8 | ,*outbuf[, outbufPos++]
145  inbufBitCount += 8
148  inbufBitCount -= bits_wanted
149  bits |= inbufBits >> inbufBitCount & (1 << bits_wanted) - 1
151  Return bits
Caller
NameDescribe
get_next_blockUnpacks the next block and sets up for the inverse burrows-wheeler step.
start_bunzipAllocate 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.