Lines Matching defs:srcSize
96 MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize);
255 * `srcSize` must be the *exact* size of the bitStream, in bytes.
256 * @return : size of stream (== srcSize), or an errorCode if a problem is detected
258 MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize)
260 if (srcSize < 1) { ZSTD_memset(bitD, 0, sizeof(*bitD)); return ERROR(srcSize_wrong); }
265 if (srcSize >= sizeof(bitD->bitContainer)) { /* normal case */
266 bitD->ptr = (const char*)srcBuffer + srcSize - sizeof(bitD->bitContainer);
268 { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1];
274 switch(srcSize)
296 { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1];
300 bitD->bitsConsumed += (U32)(sizeof(bitD->bitContainer) - srcSize)*8;
303 return srcSize;
432 bitD->bitContainer = MEM_readLEST(bitD->ptr); /* reminder : srcSize > sizeof(bitD->bitContainer), otherwise bitD->ptr == bitD->start */