/* ZSTD_getcBlockSize() : Provides the size of compressed block from block header  */
size_t ZSTD_getcBlockSize(const void *src, size_t srcSize, blockProperties_t *bpPtr)
/* ZSTD_getcBlockSize() : Provides the size of compressed block from block header  */
size_t ZSTD_getcBlockSize(const void *src, size_t srcSize, blockProperties_t *bpPtr)
{
	if (srcSize < ZSTD_blockHeaderSize)
		return ERROR(srcSize_wrong);
	{
		U32 const cBlockHeader = ZSTD_readLE24(src);
		U32 const cSize = cBlockHeader >> 3;
		bpPtr->lastBlock = cBlockHeader & 1;
		bpPtr->blockType = (blockType_e)((cBlockHeader >> 1) & 3);
		bpPtr->origSize = cSize;
		if (bpPtr->blockType == bt_rle)
			return 1;
		if (bpPtr->blockType == bt_reserved)
			return ERROR(corruption_detected);
		return cSize;
	}
}