Remove rawSeqStore.base and add rawSeqStore.posInSequence
This commit is contained in:
parent
cfd2aec1b7
commit
ef823e0299
@ -2354,7 +2354,7 @@ static size_t ZSTD_buildSeqStore(ZSTD_CCtx* zc, const void* src, size_t srcSize)
|
||||
src, srcSize);
|
||||
assert(zc->externSeqStore.pos <= zc->externSeqStore.size);
|
||||
} else if (zc->appliedParams.ldmParams.enableLdm) {
|
||||
rawSeqStore_t ldmSeqStore = {NULL, NULL, 0, 0, 0};
|
||||
rawSeqStore_t ldmSeqStore = {NULL, 0, 0, 0, 0};
|
||||
|
||||
ldmSeqStore.seq = zc->ldmSequences;
|
||||
ldmSeqStore.capacity = zc->maxNbLdmSequences;
|
||||
|
@ -94,8 +94,8 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
rawSeq* seq; /* The start of the sequences */
|
||||
BYTE const* base; /* The match state window base when LDMs were generated */
|
||||
size_t pos; /* The position where reading stopped. <= size. */
|
||||
size_t posInSequence; /* The position to start at within the sequence when starting a new block */
|
||||
size_t size; /* The number of sequences. <= capacity. */
|
||||
size_t capacity; /* The capacity starting from `seq` pointer */
|
||||
} rawSeqStore_t;
|
||||
|
@ -266,7 +266,7 @@ static void ZSTDMT_releaseBuffer(ZSTDMT_bufferPool* bufPool, buffer_t buf)
|
||||
|
||||
/* ===== Seq Pool Wrapper ====== */
|
||||
|
||||
static rawSeqStore_t kNullRawSeqStore = {NULL, NULL, 0, 0, 0};
|
||||
static rawSeqStore_t kNullRawSeqStore = {NULL, 0, 0, 0, 0};
|
||||
|
||||
typedef ZSTDMT_bufferPool ZSTDMT_seqPool;
|
||||
|
||||
@ -277,7 +277,7 @@ static size_t ZSTDMT_sizeof_seqPool(ZSTDMT_seqPool* seqPool)
|
||||
|
||||
static rawSeqStore_t bufferToSeq(buffer_t buffer)
|
||||
{
|
||||
rawSeqStore_t seq = {NULL, NULL, 0, 0, 0};
|
||||
rawSeqStore_t seq = {NULL, 0, 0, 0, 0};
|
||||
seq.seq = (rawSeq*)buffer.start;
|
||||
seq.capacity = buffer.capacity / sizeof(rawSeq);
|
||||
return seq;
|
||||
|
Loading…
x
Reference in New Issue
Block a user