Function report |
Source Code:lib\lz4\lz4_compress.c |
Create Date:2022-07-28 07:00:32 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:LZ4_compress_generic() :* inlined, to ensure branches are decided at compilation time
Proto:static inline __attribute__((__always_inline__)) int LZ4_compress_generic(LZ4_stream_t_internal *const dictPtr, const char *const source, char *const dest, const int inputSize, const int maxOutputSize, const limitedOutput_directive outputLimited, const tableType_t tableType, const dict_directive dict, const dictIssue_directive dictIssue, const U32 acceleration)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
LZ4_stream_t_internal *const | dictPtr | |
const char *const | source | |
char *const | dest | |
const int | inputSize | |
const int | maxOutputSize | |
const limitedOutput_directive | outputLimited | |
const tableType_t | tableType | |
const dict_directive | dict | |
const dictIssue_directive | dictIssue | |
const U32 | acceleration |
191 | lowRefLimit = ip - dictSize |
192 | dictionary = dictionary |
193 | dictEnd = dictionary + dictSize |
198 | matchlimit = iend - LASTLITERALS |
201 | olimit = op + maxOutputSize |
204 | refDelta = 0 |
207 | If inputSize > 2 113 929 216 bytes Then |
209 | Return 0 |
214 | Default |
218 | Case dict == withPrefix64k |
222 | Case dict == usingExtDict |
228 | If tableType == byU16 && inputSize >= LZ4_64Klimit Then |
231 | Return 0 |
234 | If inputSize < LZ4_minLength Then |
236 | Go to _last_literals |
240 | LZ4_putPosition(ip, hashTable, tableType, base) |
241 | ip++ |
242 | forwardH = LZ4_hashPosition(ip, tableType) |
245 | cycle |
252 | step = 1 |
253 | searchMatchNb = acceleration << Increase this value ==> compression run slower on incompressible data |
255 | Do |
262 | If Value for the false possibility is greater at compile time(forwardIp > mflimit) Then Go to _last_literals |
269 | If dict == usingExtDict Then |
272 | lowLimit = dictionary |
273 | Else |
278 | forwardH = LZ4_hashPosition(forwardIp, tableType) |
283 | When If dictIssue == dictSmall Then match < lowRefLimit Else 0 || If tableType == byU16 Then 0 Else match + MAX_DISTANCE < ip || LZ4_read32(match + refDelta) != LZ4_read32(ip) cycle |
296 | ip-- |
297 | match-- |
306 | If outputLimited && Value for the false possibility is greater at compile time(op + litLength + (2 + 1 + LASTLITERALS) + (litLength / 255) > olimit) Then Return 0 |
329 | _next_match : |
331 | LZ4_writeLE16(op, (U16)(ip - match)) |
332 | op += 2 |
338 | If dict == usingExtDict && lowLimit == dictionary Then |
345 | If limit > matchlimit Then limit = matchlimit |
361 | Else |
367 | If outputLimited && Value for the false possibility is greater at compile time(op + (1 + LASTLITERALS) + (matchCode >> 8) > olimit) Then Return 0 |
377 | LZ4_write32(op, 0xFFFFFFFF) |
398 | LZ4_putPosition(ip - 2, hashTable, tableType, base) |
404 | If dict == usingExtDict Then |
407 | lowLimit = dictionary |
408 | Else |
414 | LZ4_putPosition(ip, hashTable, tableType, base) |
416 | If If dictIssue == dictSmall Then match >= lowRefLimit Else 1 && match + MAX_DISTANCE >= ip && LZ4_read32(match + refDelta) == LZ4_read32(ip) Then |
425 | forwardH = LZ4_hashPosition(++ip, tableType) |
428 | _last_literals : |
433 | If outputLimited && op - dest + lastRun + 1 + ( lastRun + 255 - RUN_MASK) / 255 > maxOutputSize Then Return 0 |
440 | accumulator = lastRun - RUN_MASK |
442 | When accumulator >= 255 cycle op++ = 255 |
444 | op++ = accumulator |
445 | Else |
449 | No 3D Now!(op, anchor, lastRun) |
Name | Describe |
---|---|
LZ4_compress_fast_extState | |
LZ4_compress_fast_continue |
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 |