From 74e95c05cca42ed09b3391fbf577fa15132c4107 Mon Sep 17 00:00:00 2001 From: senhuang42 Date: Wed, 28 Oct 2020 11:04:18 -0400 Subject: [PATCH] Add ZSTD_SequenceRange to count ranges in array of ZSTD_Sequence --- lib/compress/zstd_compress.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index cb227bea5..e81dedbf0 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -4488,6 +4488,13 @@ size_t ZSTD_compress2(ZSTD_CCtx* cctx, } } +typedef struct { + U32 startIdx; /* Index in array of ZSTD_Sequence where range begins */ + U32 startPos; /* Absolute position within array of ZSTD_Sequence where range begins */ + U32 endIdx; /* Index in array of ZSTD_Sequence where range ends */ + U32 endPos; /* Absolute position within array of ZSTD_Sequence where range end */ +} ZSTD_sequenceRange; + /* Returns 0 on success, otherwise ZSTD error code */ static size_t ZSTD_copySequencesToSeqStore(ZSTD_CCtx* zc, const ZSTD_Sequence* inSeqs, size_t inSeqsSize, -- 2.47.2