summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2018-04-13 09:26:14 (GMT)
committerYann Collet <cyan@fb.com>2018-04-13 09:26:14 (GMT)
commitc40bac31d3886c2f69d0364823b6d6aaa972ee5b (patch)
tree778db4b4670ef19714c940a09c56350116736548 /lib
parent54ec83ce1f62014398b76a441d1ff1212dad9604 (diff)
downloadlz4-c40bac31d3886c2f69d0364823b6d6aaa972ee5b.zip
lz4-c40bac31d3886c2f69d0364823b6d6aaa972ee5b.tar.gz
lz4-c40bac31d3886c2f69d0364823b6d6aaa972ee5b.tar.bz2
added comment on variables required after _next_match
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index c48aca4..54d037c 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -787,6 +787,14 @@ LZ4_FORCE_INLINE int LZ4_compress_generic(
}
_next_match:
+ /* at this stage, the following variables must be correctly set :
+ * - ip : at start of LZ operation
+ * - match : at start of previous pattern occurence; can be within current prefix, or within extDict
+ * - offset : if maybe_ext_memSegment==1 (constant)
+ * - lowLimit : must be == dictionary to mean "match is within extDict"; must be == source otherwise
+ * - token and *token : position to write 4-bits for match length; higher 4-bits for literal length supposed already written
+ */
+
/* Encode Offset */
if (maybe_ext_memSegment) { /* static test */
assert(offset <= MAX_DISTANCE && offset > 0);