add simple test for maxBlockSize expected functionality

This commit is contained in:
Danielle Rozenblit
2023-01-12 08:55:39 -08:00
parent 1fffcfe01d
commit 53eb5a758c
3 changed files with 45 additions and 2 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -141,7 +141,7 @@ ZSTDLIB_API const char* ZSTD_versionString(void);
#define ZSTD_BLOCKSIZELOG_MAX 17
#define ZSTD_BLOCKSIZE_MAX (1<<ZSTD_BLOCKSIZELOG_MAX)
#define ZSTD_BLOCKSIZE_MAX_MIN 1 << 10 /* The minimum valid max blocksize. Maximum blocksizes smaller than this make compressBound() inaccurate. */
#define ZSTD_BLOCKSIZE_MAX_MIN (1 << 10) /* The minimum valid max blocksize. Maximum blocksizes smaller than this make compressBound() inaccurate. */
/***************************************