diff options
author | W. Felix Handte <w@felixhandte.com> | 2018-04-05 20:32:26 (GMT) |
---|---|---|
committer | W. Felix Handte <w@felixhandte.com> | 2018-04-20 00:54:35 (GMT) |
commit | a1beba13f7363df4b5d7ca9afe51963176df068d (patch) | |
tree | 5a4a0c13afd69ab4b6933c5337e9568102d4a34b /lib | |
parent | bdd7af6f71c235cea53912d0eec3b94555e9ffde (diff) | |
download | lz4-a1beba13f7363df4b5d7ca9afe51963176df068d.zip lz4-a1beba13f7363df4b5d7ca9afe51963176df068d.tar.gz lz4-a1beba13f7363df4b5d7ca9afe51963176df068d.tar.bz2 |
Reset Stream in LZ4_compress_HC
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4hc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index 673b4b3..4a52f0c 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -732,7 +732,10 @@ int LZ4_compress_HC(const char* src, char* dst, int srcSize, int dstCapacity, in LZ4_streamHC_t state; LZ4_streamHC_t* const statePtr = &state; #endif - int const cSize = LZ4_compress_HC_extStateHC(statePtr, src, dst, srcSize, dstCapacity, compressionLevel); + int cSize; + statePtr->internal_donotuse.end = (void *)-1; + LZ4_resetStreamHC(statePtr, compressionLevel); + cSize = LZ4_compress_HC_extStateHC(statePtr, src, dst, srcSize, dstCapacity, compressionLevel); #if defined(LZ4HC_HEAPMODE) && LZ4HC_HEAPMODE==1 free(statePtr); #endif |