aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexander Mohr <alexander.m.mohr@mercedes-benz.com>2022-07-05 20:52:50 +0200
committerAlexander Mohr <alexander.m.mohr@mercedes-benz.com>2022-07-05 21:14:34 +0200
commit0ac3c74de1b6de584c361f3e9485dde35f10c756 (patch)
tree24ad2216f485618fb07a09fd4e1c67bf352dc487 /lib
parent42eb47d42f041054140b8e08ffc6ba85e9f092f2 (diff)
downloadlz4-0ac3c74de1b6de584c361f3e9485dde35f10c756.tar.gz
review: fix findings
* replace assert with test for LZ4F_uncompressedUpdate * update documentation to incldue correct docstring * remove unecessary entry point * remove compress_linked_block_mode from fuzzing test Signed-off-by: Alexander Mohr <alexander.m.mohr@mercedes-benz.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/lz4frame.c2
-rw-r--r--lib/lz4hc.h12
2 files changed, 1 insertions, 13 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index 3042d6f1..80e244b3 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -1026,7 +1026,7 @@ size_t LZ4F_uncompressedUpdate(LZ4F_cctx* cctxPtr,
void* dstBuffer, size_t dstCapacity,
const void* srcBuffer, size_t srcSize,
const LZ4F_compressOptions_t* compressOptionsPtr) {
- assert(cctxPtr->prefs.frameInfo.blockMode == LZ4F_blockIndependent);
+ RETURN_ERROR_IF(cctxPtr->prefs.frameInfo.blockMode != LZ4F_blockIndependent, blockMode_invalid);
return LZ4F_compressUpdateImpl(cctxPtr,
dstBuffer, dstCapacity,
srcBuffer, srcSize,
diff --git a/lib/lz4hc.h b/lib/lz4hc.h
index 3b31624a..f4afc9ba 100644
--- a/lib/lz4hc.h
+++ b/lib/lz4hc.h
@@ -405,18 +405,6 @@ LZ4LIB_STATIC_API void LZ4_attach_HC_dictionary(
LZ4_streamHC_t *working_stream,
const LZ4_streamHC_t *dictionary_stream);
-/*! LZ4_getDictHCSize():
- * Get the size of the dictionary. This can be used for adding data without
- * compression to the LZ4 archive. If linked blocked mode is used the memory
- * of the dictionary is kept free.
- * This way uncompressed data does not influence the effectiveness of the
- * dictionary.
- * @param LZ4_dict Pointer to the dictionary to get the size of.
- * @param dictSize The maximum dictionary size. (Normally 64 KB).
- * @return The size of the dictionary.
- */
-LZ4LIB_STATIC_API int LZ4_getDictHCSize(const LZ4_streamHC_t* LZ4_streamHCPtr, int dictSize);
-
#if defined (__cplusplus)
}
#endif