Function report |
Source Code:lib\decompress_bunzip2.c |
Create Date:2022-07-28 06:16:48 |
Last Modify:2020-03-15 22:49:38 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Unpacks the next block and sets up for the inverse burrows-wheeler step.
Proto:static int __attribute__((__section__(".init.text"))) __attribute__((__cold__))get_next_block(struct bunzip_data *bd)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct bunzip_data * | bd |
158 | struct group_data * hufGroup = NULL |
159 | int * base = NULL |
160 | int * limit = NULL |
168 | selectors = Selectors = 15 bits |
175 | i = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian |
176 | j = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian |
178 | If i == 0x177245 && j == 0x385090 Then Return RETVAL_LAST_BLOCK |
180 | If i != 0x314159 || j != 0x265359 Then Return RETVAL_NOT_BZIP_DATA |
185 | If Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian Then Return RETVAL_OBSOLETE_INPUT |
187 | origPtr = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian |
188 | If origPtr >= dbufSize Then Return RETVAL_DATA_ERROR |
195 | t = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian |
196 | symTotal = 0 |
206 | groupCount = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian |
207 | If groupCount < 2 || groupCount > Constants for Huffman coding Then Return RETVAL_DATA_ERROR |
214 | nSelectors = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian |
215 | If Not nSelectors Then Return RETVAL_DATA_ERROR |
219 | When i < nSelectors cycle |
221 | When Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian cycle If j >= groupCount Then |
223 | Return RETVAL_DATA_ERROR |
234 | When j < groupCount cycle |
246 | t = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian - 1 |
248 | cycle |
249 | If t > Longest Huffman code allowed - 1 Then Return RETVAL_DATA_ERROR |
258 | k = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian |
259 | If k < 2 Then |
260 | inbufBitCount++ |
261 | Break |
296 | hufGroup = Huffman coding tables + j |
307 | pp = 0 |
337 | pp <<= 1 |
358 | cycle |
360 | If Not symCount-- Then |
361 | symCount = 64 would have been more efficient - 1 |
362 | If selector >= nSelectors Then Return RETVAL_DATA_ERROR |
364 | hufGroup = Huffman coding tables + selectors[selector++] |
380 | When inbufBitCount < maxLen cycle |
381 | If , outbufPos == inbufCount Then |
382 | j = Return the next nnn bits of input. All reads from the compressed inputare done through this function. All reads are big endian |
383 | Go to got_huff_bits |
385 | inbufBits = inbufBits << 8 | ,*outbuf[, outbufPos++] |
387 | inbufBitCount += 8 |
389 | inbufBitCount -= maxLen |
390 | j = inbufBits >> inbufBitCount & (1 << maxLen) - 1 |
392 | got_huff_bits : |
397 | ++i |
398 | inbufBitCount += maxLen - i |
400 | If i > maxLen || (j = (j >> maxLen - i ) - base[i] ) >= 256 literals + RUNA + RUNB Then Return RETVAL_DATA_ERROR |
410 | If nextSym <= SYMBOL_RUNB Then |
439 | If runPos Then |
440 | runPos = 0 |
441 | If dbufCount + t >= dbufSize Then Return RETVAL_DATA_ERROR |
461 | If dbufCount >= dbufSize Then Return RETVAL_DATA_ERROR |
470 | Do |
487 | j = 0 |
503 | If dbufCount Then |
504 | If origPtr >= dbufCount Then Return RETVAL_DATA_ERROR |
508 | State for interrupting output loop >>= 8 |
513 | Return Status return values |
Name | Describe |
---|---|
read_bunzip | Undo burrows-wheeler transform on intermediate buffer to produce output.If start_bunzip was initialized with out_fd =-1, then up to len bytes ofdata are written to outbuf. Return value is number of bytes written orerror (all errors are negative numbers) |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |