summaryrefslogtreecommitdiffstats
path: root/lib/lz4hc.h
diff options
context:
space:
mode:
authorOleg Khabinov <khabinov@fb.com>2018-09-20 18:47:30 (GMT)
committerOleg Khabinov <khabinov@fb.com>2018-10-10 17:33:04 (GMT)
commitf27ea0774e34b6680a08854af9b4de06406ba39e (patch)
tree67eed2fbb1ba4222eac1d35c47fe0e77bf86c289 /lib/lz4hc.h
parentdf6d00ede56ef97af3461cdc94721a2706ba73c3 (diff)
downloadlz4-f27ea0774e34b6680a08854af9b4de06406ba39e.zip
lz4-f27ea0774e34b6680a08854af9b4de06406ba39e.tar.gz
lz4-f27ea0774e34b6680a08854af9b4de06406ba39e.tar.bz2
Adding information about dirty context for _HC_ family of functions
Diffstat (limited to 'lib/lz4hc.h')
-rw-r--r--lib/lz4hc.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/lz4hc.h b/lib/lz4hc.h
index 4c7ba5a..26919af 100644
--- a/lib/lz4hc.h
+++ b/lib/lz4hc.h
@@ -161,7 +161,9 @@ struct LZ4HC_CCtx_internal
uint32_t lowLimit; /* below that point, no more dict */
uint32_t nextToUpdate; /* index from which to continue dictionary update */
short compressionLevel;
- short favorDecSpeed;
+ int8_t favorDecSpeed; /* favor decompression speed if this flag set,
+ otherwise, favor compression ratio */
+ int8_t dirty; /* stream has to be fully reset if this flag is set */
const LZ4HC_CCtx_internal* dictCtx;
};
@@ -179,7 +181,9 @@ struct LZ4HC_CCtx_internal
unsigned int lowLimit; /* below that point, no more dict */
unsigned int nextToUpdate; /* index from which to continue dictionary update */
short compressionLevel;
- short favorDecSpeed;
+ char favorDecSpeed; /* favor decompression speed if this flag set,
+ otherwise, favor compression ratio */
+ char dirty; /* stream has to be fully reset if this flag is set */
const LZ4HC_CCtx_internal* dictCtx;
};
@@ -314,6 +318,11 @@ void LZ4_favorDecompressionSpeed(LZ4_streamHC_t* LZ4_streamHCPtr, int favor);
* - the stream was in an indeterminate state and was used in a compression
* call that fully reset the state (LZ4_compress_HC_extStateHC()) and that
* returned success
+ *
+ * Note:
+ * A stream that was last used in a compression call that returned an error
+ * may be passed to this function. However, it will be fully reset, which will
+ * clear any existing history and settings from the context.
*/
void LZ4_resetStreamHC_fast(LZ4_streamHC_t* LZ4_streamHCPtr, int compressionLevel);