Function report |
Source Code:lib\lz4\lz4_compress.c |
Create Date:2022-07-28 07:00:39 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:-******************************* *_destSize() variant
Proto:static int LZ4_compress_destSize_generic(LZ4_stream_t_internal *const ctx, const char *const src, char *const dst, int *const srcSizePtr, const int targetDstSize, const tableType_t tableType)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
LZ4_stream_t_internal *const | ctx | |
const char *const | src | |
char *const | dst | |
int *const | srcSizePtr | |
const int | targetDstSize | |
const tableType_t | tableType |
534 | iend = ip + srcSizePtr |
536 | matchlimit = iend - LASTLITERALS |
539 | oend = op + targetDstSize |
540 | oMaxLit = op + targetDstSize - 2 - 8 - 1 |
542 | oMaxMatch = op + targetDstSize - LASTLITERALS + 1 |
550 | If targetDstSize < 1 Then Return 0 |
553 | If ((U32) * srcSizePtr > 2 113 929 216 bytes ) Then Return 0 |
556 | If tableType == byU16 && srcSizePtr >= LZ4_64Klimit Then Return 0 |
559 | If srcSizePtr < LZ4_minLength Then Go to _last_literals |
563 | srcSizePtr = 0 |
564 | LZ4_putPosition(ip, hashTable, tableType, base) |
565 | ip++ |
565 | forwardH = LZ4_hashPosition(ip, tableType) |
568 | cycle |
575 | step = 1 |
578 | Do |
585 | If Value for the false possibility is greater at compile time(forwardIp > mflimit) Then Go to _last_literals |
590 | forwardH = LZ4_hashPosition(forwardIp, tableType) |
596 | When If tableType == byU16 Then 0 Else match + MAX_DISTANCE < ip || LZ4_read32(match) != LZ4_read32(ip) cycle |
635 | _next_match : |
637 | LZ4_writeLE16(op, (U16)(ip - match)) |
637 | op += 2 |
641 | matchLength = LZ4_count(ip + -************************************* Constants, match + -************************************* Constants, matchlimit) |
644 | If op + (matchLength + 240) / 255 > oMaxMatch Then |
646 | matchLength = 15 - 1 + (oMaxMatch - op) * 255 |
650 | If matchLength >= ML_MASK Then |
652 | matchLength -= ML_MASK |
653 | When matchLength >= 255 cycle |
654 | matchLength -= 255 |
655 | op++ = 255 |
657 | op++ = matchLength |
658 | Else token += matchLength |
671 | LZ4_putPosition(ip - 2, hashTable, tableType, base) |
675 | LZ4_putPosition(ip, hashTable, tableType, base) |
677 | If match + MAX_DISTANCE >= ip && LZ4_read32(match) == LZ4_read32(ip) Then |
684 | forwardH = LZ4_hashPosition(++ip, tableType) |
687 | _last_literals : |
690 | lastRunSize = iend - anchor |
692 | If op + 1 + (lastRunSize + 240) / 255 + lastRunSize > oend Then |
696 | lastRunSize = oend - op - 1 |
697 | lastRunSize -= (lastRunSize + 240) / 255 |
699 | ip = anchor + lastRunSize |
701 | If lastRunSize >= RUN_MASK Then |
702 | accumulator = lastRunSize - RUN_MASK |
705 | When accumulator >= 255 cycle op++ = 255 |
707 | op++ = accumulator |
708 | Else |
709 | op++ = lastRunSize << ML_BITS |
711 | No 3D Now!(op, anchor, lastRunSize) |
712 | op += lastRunSize |
716 | srcSizePtr = ip - src |
Name | Describe |
---|---|
LZ4_compress_destSize_extState |
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 |