Function report |
Source Code:lib\zstd\zstd_opt.h |
Create Date:2022-07-28 07:05:00 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ZSTD_compressBlock_opt_extDict_generic
Proto:void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx *ctx, const void *src, size_t srcSize, const int ultra)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
ZSTD_CCtx * | ctx | |
const void * | src | |
size_t | srcSize | |
const int | ultra |
702 | seqStorePtr = &seqStore |
709 | lowestIndex = lowLimit |
711 | prefixStart = base + dictLimit |
715 | maxSearches = 1U << searchLog |
716 | sufficient_len = targetLength |
717 | mls = searchLength |
718 | minMatch = If searchLength == 3 Then 3 Else 4 |
721 | matches = matchTable |
732 | nextToUpdate3 = nextToUpdate |
733 | ZSTD_rescaleFreqs(seqStorePtr, (constBYTE * )src, srcSize) |
734 | ip += ip == prefixStart |
741 | memset(opt, 0, sizeof(ZSTD_optimal_t)) |
742 | last_pos = 0 |
747 | last_i = umber of repcodes to check by the optimal parser + (ip == anchor) |
753 | If repCur > 0 && repCur <= curr && dictLimit - 1 - repIndex >= 3 & repIndex > lowestIndex && safe only for comparisons == safe only for comparisons Then |
758 | mlen = ZSTD_count_2segments() :* can count match length with `ip` & `match` in 2 different segments.* convention : on reaching mEnd, match count continue starting from iStart + minMatch |
760 | If mlen > sufficient_len || mlen >= -************************************** Common constants Then |
770 | Do |
771 | price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra) |
774 | mlen-- |
780 | match_num = ZSTD_BtGetAllMatches_selectMLS_extDict(ctx, ip, iend, maxSearches, mls, matches, minMatch) |
792 | mlen = 1 |
794 | If match_num && ( len > sufficient_len || len >= -************************************** Common constants ) Then |
818 | ip++ |
819 | Continue |
826 | If mlen == 1 Then |
829 | price = price + ZSTD_getLiteralPrice(seqStorePtr, litlen, inr - litlen) |
830 | Else price = ZSTD_getLiteralPrice(seqStorePtr, litlen, anchor) |
832 | Else |
833 | litlen = 1 |
834 | price = price + ZSTD_getLiteralPrice(seqStorePtr, litlen, inr - 1) |
847 | If off > ZSTD_REP_MOVE_OPT Then |
851 | Else |
860 | last_i = umber of repcodes to check by the optimal parser + (mlen != 1) |
866 | If repCur > 0 && repCur <= curr + cur && dictLimit - 1 - repIndex >= 3 & repIndex > lowestIndex && safe only for comparisons == safe only for comparisons Then |
871 | mlen = ZSTD_count_2segments() :* can count match length with `ip` & `match` in 2 different segments.* convention : on reaching mEnd, match count continue starting from iStart + minMatch |
873 | If mlen > sufficient_len || cur + mlen >= -************************************** Common constants Then |
884 | Do |
905 | match_num = ZSTD_BtGetAllMatches_selectMLS_extDict(ctx, inr, iend, maxSearches, mls, matches, minMatch) |
907 | If match_num > 0 && ( len > sufficient_len || cur + len >= -************************************** Common constants ) Then |
920 | If mlen == 1 Then |
922 | If cur > litlen Then price = price + ZSTD_getPrice(seqStorePtr, litlen, ip + cur - litlen, off - 1, mlen - MINMATCH, ultra) |
925 | Else price = ZSTD_getPrice(seqStorePtr, litlen, anchor, off - 1, mlen - MINMATCH, ultra) |
927 | Else |
928 | litlen = 0 |
929 | price = price + ZSTD_getPrice(seqStorePtr, 0, NULL, off - 1, mlen - MINMATCH, ultra) |
935 | mlen++ |
945 | _storeSequence : |
946 | mlen = 1 |
948 | When 1 cycle |
966 | If mlen == 1 Then |
975 | If offset > ZSTD_REP_MOVE_OPT Then |
980 | Else |
981 | If offset != 0 Then |
993 | ZSTD_updatePrice(seqStorePtr, litLength, anchor, offset, mlen - MINMATCH) |
1002 | When i < umber of repcodes cycle repToConfirm[i] = rep[i] |
1008 | lastLLSize = iend - anchor |
1009 | No 3D Now!(lit, anchor, lastLLSize) |
1010 | lit += lastLLSize |
Name | Describe |
---|---|
ZSTD_compressBlock_btopt_extDict | |
ZSTD_compressBlock_btopt2_extDict |
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 |