summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
authorW. Felix Handte <w@felixhandte.com>2018-04-11 20:04:24 (GMT)
committerW. Felix Handte <w@felixhandte.com>2018-04-11 20:28:56 (GMT)
commitafa52c9b95dd1f83d80cd9a783a408822700e2d3 (patch)
tree948ff0fb0825c09f2835f6575aa400740fd6f615 /lib/lz4.c
parent21f0c9700b28301bdc8b49fcbe4ccdddf4cf5dea (diff)
downloadlz4-afa52c9b95dd1f83d80cd9a783a408822700e2d3.zip
lz4-afa52c9b95dd1f83d80cd9a783a408822700e2d3.tar.gz
lz4-afa52c9b95dd1f83d80cd9a783a408822700e2d3.tar.bz2
Expose dictCtx Functionality in LZ4
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index c2d1c32..cee85ec 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1191,6 +1191,10 @@ int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
return dict->dictSize;
}
+void LZ4_attach_dictionary(LZ4_stream_t *working_stream, const LZ4_stream_t *dictionary_stream) {
+ working_stream->internal_donotuse.dictCtx = dictionary_stream != NULL ? &(dictionary_stream->internal_donotuse) : NULL;
+}
+
static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, const BYTE* src)
{