diff --git a/src/shrink_block_v2.c b/src/shrink_block_v2.c index cb7a510..99a4367 100644 --- a/src/shrink_block_v2.c +++ b/src/shrink_block_v2.c @@ -188,7 +188,6 @@ static void lzsa_optimize_matches_v2(lzsa_compressor *pCompressor, const int nSt int *cost = (int*)pCompressor->pos_data; /* Reuse */ int *prev_match = (int*)pCompressor->intervals; /* Reuse */ lzsa_repmatch_opt *repmatch_opt = pCompressor->repmatch_opt; - lzsa_match *pBestMatch = pCompressor->best_match; int nLastLiteralsOffset; int nMinMatchSize = pCompressor->min_match_size; const int nFavorRatio = (pCompressor->flags & LZSA_FLAG_FAVOR_RATIO) ? 1 : 0; @@ -805,7 +804,6 @@ static int lzsa_get_compressed_size_v2(lzsa_compressor *pCompressor, lzsa_match } { - int nTokenLiteralsLen = (nNumLiterals >= LITERALS_RUN_LEN_V2) ? LITERALS_RUN_LEN_V2 : nNumLiterals; int nCommandSize = 8 /* token */ + lzsa_get_literals_varlen_size_v2(nNumLiterals) + (nNumLiterals << 3); nCompressedSize += nCommandSize; diff --git a/src/shrink_streaming.c b/src/shrink_streaming.c index 63dc89f..58471e4 100644 --- a/src/shrink_streaming.c +++ b/src/shrink_streaming.c @@ -70,6 +70,7 @@ static void lzsa_delete_file(const char *pszInFilename) { * @param pOriginalSize pointer to returned input(source) size, updated when this function is successful * @param pCompressedSize pointer to returned output(compressed) size, updated when this function is successful * @param pCommandCount pointer to returned token(compression commands) count, updated when this function is successful + * @param pSafeDist pointer to return safe distance for raw blocks, updated when this function is successful * * @return LZSA_OK for success, or an error value from lzsa_status_t */ @@ -127,6 +128,7 @@ lzsa_status_t lzsa_compress_file(const char *pszInFilename, const char *pszOutFi * @param pOriginalSize pointer to returned input(source) size, updated when this function is successful * @param pCompressedSize pointer to returned output(compressed) size, updated when this function is successful * @param pCommandCount pointer to returned token(compression commands) count, updated when this function is successful + * @param pSafeDist pointer to return safe distance for raw blocks, updated when this function is successful * * @return LZSA_OK for success, or an error value from lzsa_status_t */ diff --git a/src/shrink_streaming.h b/src/shrink_streaming.h index 2d2186e..1e66bdc 100644 --- a/src/shrink_streaming.h +++ b/src/shrink_streaming.h @@ -57,6 +57,7 @@ typedef enum _lzsa_status_t lzsa_status_t; * @param pOriginalSize pointer to returned input(source) size, updated when this function is successful * @param pCompressedSize pointer to returned output(compressed) size, updated when this function is successful * @param pCommandCount pointer to returned token(compression commands) count, updated when this function is successful + * @param pSafeDist pointer to return safe distance for raw blocks, updated when this function is successful * * @return LZSA_OK for success, or an error value from lzsa_status_t */ @@ -80,6 +81,7 @@ lzsa_status_t lzsa_compress_file(const char *pszInFilename, const char *pszOutFi * @param pOriginalSize pointer to returned input(source) size, updated when this function is successful * @param pCompressedSize pointer to returned output(compressed) size, updated when this function is successful * @param pCommandCount pointer to returned token(compression commands) count, updated when this function is successful + * @param pSafeDist pointer to return safe distance for raw blocks, updated when this function is successful * * @return LZSA_OK for success, or an error value from lzsa_status_t */