diff --git a/doc/zstd_manual.html b/doc/zstd_manual.html
index 0c82115b3..6ac5573f0 100644
--- a/doc/zstd_manual.html
+++ b/doc/zstd_manual.html
@@ -346,7 +346,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
typedef struct {
unsigned long long frameContentSize;
- size_t windowSize;
+ unsigned long long windowSize; /* can be == frameContentSize */
unsigned dictID;
unsigned checksumFlag;
} ZSTD_frameHeader;
diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c
index 6eca1c471..5e2776579 100644
--- a/lib/decompress/zstd_decompress.c
+++ b/lib/decompress/zstd_decompress.c
@@ -375,7 +375,8 @@ unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize)
}
#endif
{ ZSTD_frameHeader fParams;
- if (ZSTD_getFrameHeader(&fParams, src, srcSize) != 0) return ZSTD_CONTENTSIZE_ERROR;
+ if (ZSTD_getFrameHeader(&fParams, src, srcSize) != 0)
+ return ZSTD_CONTENTSIZE_ERROR;
if (fParams.windowSize == 0) {
/* Either skippable or empty frame, size == 0 either way */
return 0;
@@ -442,7 +443,8 @@ unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize)
* compatible with legacy mode
* @return : decompressed size if known, 0 otherwise
note : 0 can mean any of the following :
- - decompressed size is not present within frame header
+ - frame content is empty
+ - decompressed size field is not present in frame header
- frame header unknown / not supported
- frame header not complete (`srcSize` too small) */
unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize)
diff --git a/lib/zstd.h b/lib/zstd.h
index 58e9a5606..1314b8296 100644
--- a/lib/zstd.h
+++ b/lib/zstd.h
@@ -427,7 +427,7 @@ typedef struct {
typedef struct {
unsigned long long frameContentSize;
- size_t windowSize;
+ unsigned long long windowSize; /* can be == frameContentSize */
unsigned dictID;
unsigned checksumFlag;
} ZSTD_frameHeader;