Function report |
Source Code:lib\zlib_deflate\deflate.c |
Create Date:2022-07-28 06:58:24 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:zlib_deflate
Proto:int zlib_deflate(z_streamp strm, int flush)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| z_streamp | strm | |
| int | flush |
| 337 | Return Z_STREAM_ERROR |
| 339 | s = not visible by applications |
| 341 | If next input byte == NULL && number of bytes available at next_in != 0 || as the name implies == FINISH_STATE && flush != Z_FINISH Then |
| 343 | Return Z_STREAM_ERROR |
| 345 | If remaining free space at next_out == 0 Then Return Z_BUF_ERROR |
| 352 | If as the name implies == All codes must not exceed MAX_BITS bits Then |
| 354 | header = Possible values of the data_type field + ( log2(w_size) (8..16) - 8 << 4) << 8 |
| 355 | level_flags = compression level (1..9) - 1 >> 1 |
| 357 | If level_flags > 3 Then level_flags = 3 |
| 358 | header |= level_flags << 6 |
| 359 | If start of string to insert != 0 Then header |= preset dictionary flag in zlib header |
| 363 | putShortMSB(s, header) |
| 366 | If start of string to insert != 0 Then |
| 367 | putShortMSB(s, (uInt)( adler32 value of the uncompressed data >> 16)) |
| 368 | putShortMSB(s, (uInt)( adler32 value of the uncompressed data & 0xffff)) |
| 374 | If b of bytes in the pending buffer != 0 Then |
| 375 | flush_pending(strm) |
| 376 | If remaining free space at next_out == 0 Then |
| 391 | Else if number of bytes available at next_in == 0 && flush <= old_flush && flush != Z_FINISH Then |
| 393 | Return Z_BUF_ERROR |
| 397 | If as the name implies == FINISH_STATE && number of bytes available at next_in != 0 Then |
| 398 | Return Z_BUF_ERROR |
| 403 | If number of bytes available at next_in != 0 || umber of valid bytes ahead in window != 0 || flush != constants && as the name implies != FINISH_STATE Then |
| 409 | If bstate == ish started, need only more output at next deflate || bstate == finish_done Then |
| 413 | If remaining free space at next_out == 0 Then |
| 425 | If bstate == lock flush performed Then |
| 426 | If flush == will be removed, use Z_SYNC_FLUSH instead Then |
| 427 | zlib_tr_align(s) |
| 428 | Else if flush == Z_PACKET_FLUSH Then |
| 432 | Else |
| 441 | flush_pending(strm) |
| 442 | If remaining free space at next_out == 0 Then |
| 450 | If flush != Z_FINISH Then Return Allowed flush values; see deflate() and inflate() below for details |
| 451 | If suppress zlib header and adler32 Then Return Z_STREAM_END |
| 454 | putShortMSB(s, (uInt)( adler32 value of the uncompressed data >> 16)) |
| 455 | putShortMSB(s, (uInt)( adler32 value of the uncompressed data & 0xffff)) |
| 456 | flush_pending(strm) |
| 460 | suppress zlib header and adler32 = -1 |
| 461 | Return If b of bytes in the pending buffer != 0 Then Allowed flush values; see deflate() and inflate() below for details Else Z_STREAM_END |
| 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 |