codemod: ZSTD_sequenceLength -> ZSTD_SequenceLength
This commit is contained in:
@@ -121,15 +121,15 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
U32 litLength;
|
U32 litLength;
|
||||||
U32 matchLength;
|
U32 matchLength;
|
||||||
} ZSTD_sequenceLength;
|
} ZSTD_SequenceLength;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the ZSTD_sequenceLength for the given sequences. It handles the decoding of long sequences
|
* Returns the ZSTD_SequenceLength for the given sequences. It handles the decoding of long sequences
|
||||||
* indicated by longLengthPos and longLengthType, and adds MINMATCH back to matchLength.
|
* indicated by longLengthPos and longLengthType, and adds MINMATCH back to matchLength.
|
||||||
*/
|
*/
|
||||||
MEM_STATIC ZSTD_sequenceLength ZSTD_getSequenceLength(SeqStore_t const* seqStore, SeqDef const* seq)
|
MEM_STATIC ZSTD_SequenceLength ZSTD_getSequenceLength(SeqStore_t const* seqStore, SeqDef const* seq)
|
||||||
{
|
{
|
||||||
ZSTD_sequenceLength seqLen;
|
ZSTD_SequenceLength seqLen;
|
||||||
seqLen.litLength = seq->litLength;
|
seqLen.litLength = seq->litLength;
|
||||||
seqLen.matchLength = seq->mlBase + MINMATCH;
|
seqLen.matchLength = seq->mlBase + MINMATCH;
|
||||||
if (seqStore->longLengthPos == (U32)(seq - seqStore->sequencesStart)) {
|
if (seqStore->longLengthPos == (U32)(seq - seqStore->sequencesStart)) {
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ ZSTD_seqDecompressedSize(SeqStore_t const* seqStore,
|
|||||||
size_t litLengthSum = 0;
|
size_t litLengthSum = 0;
|
||||||
size_t n;
|
size_t n;
|
||||||
for (n=0; n<nbSeqs; n++) {
|
for (n=0; n<nbSeqs; n++) {
|
||||||
const ZSTD_sequenceLength seqLen = ZSTD_getSequenceLength(seqStore, sequences+n);
|
const ZSTD_SequenceLength seqLen = ZSTD_getSequenceLength(seqStore, sequences+n);
|
||||||
litLengthSum += seqLen.litLength;
|
litLengthSum += seqLen.litLength;
|
||||||
matchLengthSum += seqLen.matchLength;
|
matchLengthSum += seqLen.matchLength;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user