Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

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:

TypeParameterName
ZSTD_CCtx *ctx
const void *src
size_tsrcSize
const intultra
702  seqStorePtr = &seqStore
703  istart = src
704  ip = istart
705  anchor = istart
706  iend = istart + srcSize
707  ilimit = iend - 8
708  base = base
709  lowestIndex = lowLimit
710  dictLimit = dictLimit
711  prefixStart = base + dictLimit
712  dictBase = dictBase
713  dictEnd = dictBase + dictLimit
715  maxSearches = 1U << searchLog
716  sufficient_len = targetLength
717  mls = searchLength
718  minMatch = If searchLength == 3 Then 3 Else 4
720  opt = opt
721  matches = matchTable
728  When i < umber of repcodes cycle rep[i] = rep[i]
732  nextToUpdate3 = nextToUpdate
733  ZSTD_rescaleFreqs(seqStorePtr, (constBYTE * )src, srcSize)
734  ip += ip == prefixStart
737  When ip < ilimit cycle
740  curr = ip - base
741  memset(opt, 0, sizeof(ZSTD_optimal_t))
742  last_pos = 0
743  litlen = ip - anchor
748  When i < last_i cycle
780  match_num = ZSTD_BtGetAllMatches_selectMLS_extDict(ctx, ip, iend, maxSearches, mls, matches, minMatch)
782  If Not last_pos && Not match_num Then
783  ip++
784  Continue
789  When i < umber of repcodes cycle rep[i] = rep[i]
792  mlen = 1
795  best_mlen = len
796  best_off = off
797  cur = 0
798  last_pos = 1
799  Go to _storeSequence
802  best_mlen = If last_pos Then last_pos Else minMatch
805  When u < match_num cycle
806  mlen = If u > 0 Then len + 1 Else best_mlen
807  best_mlen = len
808  litlen = litlen
809  When mlen <= best_mlen cycle
811  If mlen > last_pos || price < price Then
813  mlen++
817  If last_pos < minMatch Then
818  ip++
819  Continue
823  When cur <= last_pos cycle
824  inr = ip + cur
826  If mlen == 1 Then
832  Else
837  If cur > last_pos || price <= price Then
840  If cur == last_pos Then Break
843  If inr > ilimit Then Continue
846  mlen = mlen
847  If off > ZSTD_REP_MOVE_OPT Then
848  rep[2] = rep[1]
849  rep[1] = rep[0]
850  rep[0] = off - ZSTD_REP_MOVE_OPT
851  Else
852  rep[2] = If off > 1 Then rep[1] Else rep[2]
853  rep[1] = If off > 0 Then rep[0] Else rep[1]
854  rep[0] = If off == ZSTD_REP_MOVE_OPT && mlen != 1 Then rep[0] - 1 Else rep[off]
861  When i < last_i cycle
908  best_mlen = len
909  best_off = off
910  last_pos = cur + 1
911  Go to _storeSequence
915  When u < match_num cycle
916  mlen = If u > 0 Then len + 1 Else best_mlen
917  best_mlen = len
919  When mlen <= best_mlen cycle
920  If mlen == 1 Then
927  Else
928  litlen = 0
932  If cur + mlen > last_pos || price < price Then
935  mlen++
940  best_mlen = mlen
941  best_off = off
942  cur = last_pos - best_mlen
945  _storeSequence :
946  mlen = 1
948  When 1 cycle
949  mlen = mlen
950  offset = off
951  mlen = best_mlen
952  off = best_off
953  best_mlen = mlen
954  best_off = offset
955  If mlen > cur Then Break
957  cur -= mlen
960  When u <= last_pos cycle
961  u += mlen
964  When cur < last_pos cycle
965  mlen = mlen
966  If mlen == 1 Then
967  ip++
968  cur++
969  Continue
971  offset = off
972  cur += mlen
973  litLength = ip - anchor
975  If offset > ZSTD_REP_MOVE_OPT Then
976  rep[2] = rep[1]
977  rep[1] = rep[0]
979  offset--
980  Else
981  If offset != 0 Then
982  best_off = If offset == ZSTD_REP_MOVE_OPT Then rep[0] - 1 Else rep[offset]
983  If offset != 1 Then rep[2] = rep[1]
985  rep[1] = rep[0]
986  rep[0] = best_off
989  If litLength == 0 Then offset--
995  anchor = ip = ip + mlen
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
Caller
NameDescribe
ZSTD_compressBlock_btopt_extDict
ZSTD_compressBlock_btopt2_extDict