MEM_STATIC ZSTD_frameSizeInfo ZSTD_findFrameSizeInfoLegacy(const void *src, size_t srcSize)
{
- U32 const version = ZSTD_isLegacy(src, srcSize);
ZSTD_frameSizeInfo frameSizeInfo;
- memset(&frameSizeInfo, 0, sizeof(ZSTD_frameSizeInfo));
+ U32 const version = ZSTD_isLegacy(src, srcSize);
switch(version)
{
#if (ZSTD_LEGACY_SUPPORT <= 1)
/**
ZSTDv01_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.1.x format
srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src'
- cSize (output parameter) : the number of bytes that would be read to decompress this frame
- or an errorCode if it fails (which can be tested using ZSTDv01_isError())
- dBound (output paramter) : an upper-bound for the decompressed size of the data in the frame
- or ZSTD_CONTENTSIZE_ERROR if an error occurs
+ cSize (output parameter) : the number of bytes that would be read to decompress this frame
+ or an error code if it fails (which can be tested using ZSTDv01_isError())
+ dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame
+ or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes `cSize` and `dBound` are _not_ NULL.
*/
/**
ZSTDv02_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.2.x format
srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src'
- cSize (output parameter) : the number of bytes that would be read to decompress this frame
- or an errorCode if it fails (which can be tested using ZSTDv01_isError())
- dBound (output paramter) : an upper-bound for the decompressed size of the data in the frame
- or ZSTD_CONTENTSIZE_ERROR if an error occurs
+ cSize (output parameter) : the number of bytes that would be read to decompress this frame
+ or an error code if it fails (which can be tested using ZSTDv01_isError())
+ dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame
+ or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes `cSize` and `dBound` are _not_ NULL.
*/
/**
ZSTDv03_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.3.x format
srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src'
- cSize (output parameter) : the number of bytes that would be read to decompress this frame
- or an errorCode if it fails (which can be tested using ZSTDv01_isError())
- dBound (output paramter) : an upper-bound for the decompressed size of the data in the frame
- or ZSTD_CONTENTSIZE_ERROR if an error occurs
+ cSize (output parameter) : the number of bytes that would be read to decompress this frame
+ or an error code if it fails (which can be tested using ZSTDv01_isError())
+ dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame
+ or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes `cSize` and `dBound` are _not_ NULL.
*/
/**
ZSTDv04_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.4.x format
srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src'
- cSize (output parameter) : the number of bytes that would be read to decompress this frame
- or an errorCode if it fails (which can be tested using ZSTDv01_isError())
- dBound (output paramter) : an upper-bound for the decompressed size of the data in the frame
- or ZSTD_CONTENTSIZE_ERROR if an error occurs
+ cSize (output parameter) : the number of bytes that would be read to decompress this frame
+ or an error code if it fails (which can be tested using ZSTDv01_isError())
+ dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame
+ or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes `cSize` and `dBound` are _not_ NULL.
*/
/**
ZSTDv05_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.5.x format
srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src'
- cSize (output parameter) : the number of bytes that would be read to decompress this frame
- or an errorCode if it fails (which can be tested using ZSTDv01_isError())
- dBound (output paramter) : an upper-bound for the decompressed size of the data in the frame
- or ZSTD_CONTENTSIZE_ERROR if an error occurs
+ cSize (output parameter) : the number of bytes that would be read to decompress this frame
+ or an error code if it fails (which can be tested using ZSTDv01_isError())
+ dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame
+ or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes `cSize` and `dBound` are _not_ NULL.
*/
/**
ZSTDv06_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.6.x format
srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src'
- cSize (output parameter) : the number of bytes that would be read to decompress this frame
- or an errorCode if it fails (which can be tested using ZSTDv01_isError())
- dBound (output paramter) : an upper-bound for the decompressed size of the data in the frame
- or ZSTD_CONTENTSIZE_ERROR if an error occurs
+ cSize (output parameter) : the number of bytes that would be read to decompress this frame
+ or an error code if it fails (which can be tested using ZSTDv01_isError())
+ dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame
+ or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes `cSize` and `dBound` are _not_ NULL.
*/
/**
ZSTDv07_findFrameSizeInfoLegacy() : get the source length and decompressed bound of a ZSTD frame compliant with v0.7.x format
srcSize : The size of the 'src' buffer, at least as large as the frame pointed to by 'src'
- cSize (output parameter) : the number of bytes that would be read to decompress this frame
- or an errorCode if it fails (which can be tested using ZSTDv01_isError())
- dBound (output paramter) : an upper-bound for the decompressed size of the data in the frame
- or ZSTD_CONTENTSIZE_ERROR if an error occurs
+ cSize (output parameter) : the number of bytes that would be read to decompress this frame
+ or an error code if it fails (which can be tested using ZSTDv01_isError())
+ dBound (output parameter) : an upper-bound for the decompressed size of the data in the frame
+ or ZSTD_CONTENTSIZE_ERROR if an error occurs
note : assumes `cSize` and `dBound` are _not_ NULL.
*/