From 523e0a7214a86942feabcbee8a0e0e195080b0f2 Mon Sep 17 00:00:00 2001 From: Danielle Rozenblit Date: Thu, 12 Jan 2023 08:17:08 -0800 Subject: [PATCH] add simple test for maxBlockSize expected functionality --- lib/compress/zstd_compress.c | 2 +- lib/zstd.h | 2 +- tests/zstreamtest.c | 43 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index e27cbd6133d..6872d3364b1 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -288,7 +288,7 @@ static int ZSTD_resolveExternalSequenceValidation(int mode) { #endif } -/* Sets the default maximum block size. */ +/* Resolves maxBlockSize to the default if no value is present. */ static size_t ZSTD_resolveMaxBlockSize(size_t maxBlockSize) { if (maxBlockSize == 0) { return ZSTD_BLOCKSIZE_MAX; diff --git a/lib/zstd.h b/lib/zstd.h index 2287886858c..0c0fc1afc91 100644 --- a/lib/zstd.h +++ b/lib/zstd.h @@ -141,7 +141,7 @@ ZSTDLIB_API const char* ZSTD_versionString(void); #define ZSTD_BLOCKSIZELOG_MAX 17 #define ZSTD_BLOCKSIZE_MAX (1<