Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

Name:zlib_deflate

Proto:int zlib_deflate(z_streamp strm, int flush)

Type:int

Parameter:

TypeParameterName
z_streampstrm
intflush
335  If strm == NULL || not visible by applications == NULL || flush > Z_FINISH || flush < 0 Then
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
347  pointer back to this zlib stream = strm
348  old_flush = value of flush param for previous deflate call
349  value of flush param for previous deflate call = flush
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
360  header += 31 - header % 31
362  as the name implies = BUSY_STATE
363  putShortMSB(s, header)
366  If start of string to insert != 0 Then
370  adler32 value of the uncompressed data = 1L
374  If b of bytes in the pending buffer != 0 Then
375  flush_pending(strm)
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
407  bstate = ( * (func))(s, flush)
425  If bstate == lock flush performed Then
427  zlib_tr_align(s)
428  Else if flush == Z_PACKET_FLUSH Then
432  Else
433  zlib_tr_stored_block(s, (char * )0, 0L, 0)
437  If flush == Z_FULL_FLUSH Then