函数逻辑报告 |
Source Code:lib\lz4\lz4_decompress.c |
Create Date:2022-07-27 07:58:47 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:LZ4_decompress_generic() :* This generic decompression function covers all use cases.* It shall be instantiated several times, using different sets of directives.* Note that it is important for performance that this function really get inlined,
函数原型:static inline __attribute__((__always_inline__)) int LZ4_decompress_generic(const char *const src, char *const dst, int srcSize, int outputSize, endCondition_directive endOnInput, earlyEnd_directive partialDecoding, dict_directive dict, const BYTE *const lowPrefix, const BYTE *const dictStart, const size_t dictSize)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
const char *const | src | |
char *const | dst | |
int | srcSize | |
int | outputSize | If endOnInput == endOnInputSize,* this value is `dstCapacity` |
endCondition_directive | endOnInput | dOnOutputSize, endOnInputSize |
earlyEnd_directive | partialDecoding | ull, partial |
dict_directive | dict | Dict, withPrefix64k, usingExtDict |
const BYTE *const | lowPrefix | always <= dst, == dst when no prefix |
const BYTE *const | dictStart | ly if dict == usingExtDict |
const size_t | dictSize | : = 0 if noDict |
91 | static const unsigned int inc32table[8] = {0, 1, 2, 1, 0, 4, 4, 4} |
92 | static const int dec64table[8] = {0, 0, 0, - 1, - 4, 1, 2, 3} |
95 | checkOffset等于safeDecode且 : = 0 if noDict 小于64乘KB |
98 | shortiend等于iend减如果dOnOutputSize, endOnInputSize 则14否则8减2 |
100 | shortoend等于oend减如果dOnOutputSize, endOnInputSize 则14否则8减18 |
111 | 如果dOnOutputSize, endOnInputSize 且此条件成立可能性小(为编译器优化)(If endOnInput == endOnInputSize,* this value is `dstCapacity` == 0)则返回:如果srcSize恒等于1且ip恒等于0则0否则负1 |
114 | 如果非dOnOutputSize, endOnInputSize 且此条件成立可能性小(为编译器优化)(If endOnInput == endOnInputSize,* this value is `dstCapacity` == 0)则返回:如果ip恒等于0则1否则负1 |
117 | 如果dOnOutputSize, endOnInputSize 且此条件成立可能性小(为编译器优化)(srcSize == 0)则返回:负1 |
121 | 当1循环 |
131 | assert(!dOnOutputSize, endOnInputSize || ip <= iend) |
145 | 如果如果dOnOutputSize, endOnInputSize 则length不等于RUN_MASK否则length小于等于8且此条件成立可能性大(为编译器优化)((dOnOutputSize, endOnInputSize ? ip < shortiend : 1) & (op <= shortoend))则 |
153 | 内存复制(op, ip, dOnOutputSize, endOnInputSize ? 16 : 8) |
162 | offset等于LZ4_readLE16(ip) |
163 | ip加等于2 |
168 | 如果length不等于ML_MASK且offset大于等于8且Dict, withPrefix64k, usingExtDict 恒等于withPrefix64k或match大于等于always <= dst, == dst when no prefix 的值则 |
177 | 继续下一循环 |
185 | 转到:_copy_match |
192 | 如果此条件成立可能性小(为编译器优化)(dOnOutputSize, endOnInputSize ? ip >= iend - RUN_MASK : 0)则 |
194 | 转到:_output_error |
196 | 循环 |
199 | 当此条件成立可能性大(为编译器优化)(dOnOutputSize, endOnInputSize ? ip < iend - RUN_MASK : 1)按位与s恒等于255循环 |
203 | 如果safeDecode且此条件成立可能性小(为编译器优化)((uptrval)(op) + length < (uptrval)(op))则 |
207 | 转到:_output_error |
209 | 如果safeDecode且此条件成立可能性小(为编译器优化)((uptrval)(ip) + length < (uptrval)(ip))则 |
213 | 转到:_output_error |
219 | LZ4_STATIC_ASSERT(MFLIMIT >= WILDCOPYLENGTH) |
221 | 如果dOnOutputSize, endOnInputSize 且cpy大于oend减MFLIMIT或ip加length大于iend减2加1加LASTLITERALS的值或非dOnOutputSize, endOnInputSize 且cpy大于oend减WILDCOPYLENGTH则 |
224 | 如果ull, partial 则 |
233 | 如果dOnOutputSize, endOnInputSize 且ip加length大于iend则 |
240 | 转到:_output_error |
242 | 否则 |
268 | 如果非ull, partial 或cpy恒等于oend则退出 |
270 | 否则 |
278 | offset等于LZ4_readLE16(ip) |
279 | ip加等于2 |
285 | _copy_match : |
288 | 转到:_output_error |
296 | 如果非ull, partial 则 |
306 | 循环 |
309 | 如果dOnOutputSize, endOnInputSize 且ip大于iend减LASTLITERALS则转到:_output_error |
315 | 如果safeDecode且此条件成立可能性小(为编译器优化)((uptrval)(op) + length < (uptrval)op)则 |
319 | 转到:_output_error |
327 | 如果此条件成立可能性小(为编译器优化)(op + length > oend - LASTLITERALS)则 |
329 | 如果非ull, partial 则转到:_output_error |
334 | 如果length小于等于always <= dst, == dst when no prefix 减match则 |
342 | 否则 |
354 | endOfMatch等于op加restSize |
357 | 当op小于endOfMatch循环 |
359 | 否则 |
364 | 继续下一循环 |
385 | 否则 |
391 | 继续下一循环 |
394 | 如果此条件成立可能性小(为编译器优化)(offset < 8)则 |
399 | match加等于inc32table[offset] |
401 | match减等于dec64table[offset] |
402 | 否则 |
407 | op加等于8 |
410 | oCopyLimit等于oend减WILDCOPYLENGTH减1 |
412 | 如果cpy大于oend减LASTLITERALS则 |
417 | 转到:_output_error |
420 | 如果op小于oCopyLimit则 |
422 | match加等于oCopyLimit减op |
423 | op等于oCopyLimit |
427 | 否则 |
436 | 如果dOnOutputSize, endOnInputSize 则 |
439 | 否则 |
445 | _output_error : |
名称 | 描述 |
---|---|
LZ4_decompress_safe | |
LZ4_decompress_safe_partial | |
LZ4_decompress_fast | |
LZ4_decompress_safe_withPrefix64k | ===== Instantiate a few more decoding cases, used more than once. ===== |
LZ4_decompress_safe_withSmallPrefix | |
LZ4_decompress_safe_forceExtDict | |
LZ4_decompress_fast_extDict | |
LZ4_decompress_safe_doubleDict | The "double dictionary" mode, for use with e.g. ring buffers: the first part* of the dictionary is passed as prefix, and the second via dictStart + dictSize.* These routines are used only once, in LZ4_decompress_*_continue(). |
LZ4_decompress_fast_doubleDict |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |