Function report |
Source Code:lib\decompress_unlz4.c |
Create Date:2022-07-28 06:17:51 |
| Last Modify:2020-03-15 22:50:34 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:unlz4
Proto:STATIC inline int __attribute__((__section__(".init.text"))) __attribute__((__cold__))unlz4(u8 *input, long in_len, long (*fill)(void *, unsigned long ), long (*flush)(void *, unsigned long ), u8 *output, long *posp, void (*error)(char *x))
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| u8 * | input | |
| long | in_len | |
| long (* | fill | |
| long (* | flush | |
| u8 * | output | |
| long * | posp | |
| void (* | error |
| 37 | ret = -1 |
| 38 | chunksize = 0 |
| 45 | out_len = get_unaligned_le32(input + in_len) |
| 50 | If output Then |
| 52 | Else if Not flush Then |
| 55 | Else |
| 56 | outp = large_malloc(uncomp_chunksize) |
| 57 | If Not outp Then |
| 66 | Else if input Then |
| 68 | Else if Not fill Then |
| 71 | Else |
| 73 | If Not inp Then |
| 83 | If fill Then |
| 91 | chunksize = get_unaligned_le32(inp) |
| 92 | If chunksize == ARCHIVE_MAGICNUMBER Then |
| 97 | Else |
| 105 | cycle |
| 107 | If fill Then |
| 117 | chunksize = get_unaligned_le32(inp) |
| 118 | If chunksize == ARCHIVE_MAGICNUMBER Then |
| 132 | If Not fill Then |
| 135 | Else |
| 147 | If out_len >= uncomp_chunksize Then |
| 148 | dest_len = uncomp_chunksize |
| 153 | ret = LZ4_decompress_fast(inp, outp, dest_len) |
| 161 | If ret < 0 Then |
| 166 | ret = -1 |
| 174 | If Not fill Then |
| 187 | ret = 0 |
| 188 | exit_2 : |
| 189 | If Not input Then large_free(inp_start) |
| 191 | exit_1 : |
| 192 | If Not output Then large_free(outp) |
| 194 | exit_0 : |
| 195 | Return ret |
| Name | Describe |
|---|---|
| __decompress |
| 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 |