/external/zstd/tests/ |
D | zstreamtest.c | 278 ZSTD_inBuffer inBuff, inBuff2; in basicUnitTests() local 308 inBuff.src = CNBuffer; in basicUnitTests() 309 inBuff.size = CNBufferSize; in basicUnitTests() 310 inBuff.pos = 0; in basicUnitTests() 311 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) ); in basicUnitTests() 312 if (inBuff.pos != inBuff.size) goto _output_error; /* entire input should be consumed */ in basicUnitTests() 329 inBuff.src = CNBuffer; in basicUnitTests() 330 inBuff.size = CNBufferSize; in basicUnitTests() 331 inBuff.pos = 0; in basicUnitTests() 332 CHECK_Z( ZSTD_compressStream(zc, &outBuff, &inBuff) ); in basicUnitTests() [all …]
|
/external/zstd/lib/deprecated/ |
D | zbuff_decompress.c | 56 ZSTD_inBuffer inBuff; in ZBUFF_decompressContinue() local 61 inBuff.src = src; in ZBUFF_decompressContinue() 62 inBuff.pos = 0; in ZBUFF_decompressContinue() 63 inBuff.size = *srcSizePtr; in ZBUFF_decompressContinue() 64 result = ZSTD_decompressStream(zbd, &outBuff, &inBuff); in ZBUFF_decompressContinue() 66 *srcSizePtr = inBuff.pos; in ZBUFF_decompressContinue()
|
D | zbuff_compress.c | 99 ZSTD_inBuffer inBuff; in ZBUFF_compressContinue() local 103 inBuff.src = src; in ZBUFF_compressContinue() 104 inBuff.pos = 0; in ZBUFF_compressContinue() 105 inBuff.size = *srcSizePtr; in ZBUFF_compressContinue() 106 result = ZSTD_compressStream(zbc, &outBuff, &inBuff); in ZBUFF_compressContinue() 108 *srcSizePtr = inBuff.pos; in ZBUFF_compressContinue()
|
/external/zstd/contrib/seekable_format/ |
D | zstdseek_decompress.c | 164 BYTE inBuff[SEEKABLE_BUFF_SIZE]; /* need to do our own input buffering */ member 265 CHECK_IO(src.read(src.opaque, zs->inBuff, ZSTD_seekTableFooterSize)); in ZSTD_seekable_loadSeekTable() 267 if (MEM_readLE32(zs->inBuff + 5) != ZSTD_SEEKABLE_MAGICNUMBER) { in ZSTD_seekable_loadSeekTable() 271 { BYTE const sfd = zs->inBuff[4]; in ZSTD_seekable_loadSeekTable() 280 { U32 const numFrames = MEM_readLE32(zs->inBuff); in ZSTD_seekable_loadSeekTable() 290 CHECK_IO(src.read(src.opaque, zs->inBuff, toRead)); in ZSTD_seekable_loadSeekTable() 295 if (MEM_readLE32(zs->inBuff) != (ZSTD_MAGIC_SKIPPABLE_START | 0xE)) { in ZSTD_seekable_loadSeekTable() 298 if (MEM_readLE32(zs->inBuff+4) + ZSTD_SKIPPABLEHEADERSIZE != frameSize) { in ZSTD_seekable_loadSeekTable() 323 … memmove(zs->inBuff, zs->inBuff + pos, offset); /* move any data we haven't read yet */ in ZSTD_seekable_loadSeekTable() 324 CHECK_IO(src.read(src.opaque, zs->inBuff+offset, toRead)); in ZSTD_seekable_loadSeekTable() [all …]
|
/external/zstd/lib/compress/ |
D | zstdmt_compress.c | 816 inBuff_t inBuff; member 964 mtctx->inBuff.buffer = g_nullBuffer; in ZSTDMT_releaseAllJobResources() 965 mtctx->inBuff.filled = 0; in ZSTDMT_releaseAllJobResources() 1057 fps.ingested = mtctx->consumed + mtctx->inBuff.filled; in ZSTDMT_getFrameProgression() 1282 mtctx->inBuff.buffer = g_nullBuffer; in ZSTDMT_initCStream_internal() 1283 mtctx->inBuff.filled = 0; in ZSTDMT_initCStream_internal() 1284 mtctx->inBuff.prefix = kNullRange; in ZSTDMT_initCStream_internal() 1333 BYTE const* src = (BYTE const*)mtctx->inBuff.buffer.start; in ZSTDMT_createCompressionJob() 1335 mtctx->nextJobID, (U32)srcSize, (U32)mtctx->inBuff.prefix.size); in ZSTDMT_createCompressionJob() 1338 assert(mtctx->inBuff.filled >= srcSize); in ZSTDMT_createCompressionJob() [all …]
|
D | zstd_compress.c | 1432 size_t const buffered = (cctx->inBuff == NULL) ? 0 : in ZSTD_getFrameProgression() 1707 zc->inBuff = (char*)ZSTD_cwksp_reserve_buffer(ws, buffInSize); in ZSTD_resetCCtx_internal() 4141 assert(zcs->inBuff != NULL); in ZSTD_compressStream_generic() 4178 zcs->inBuff + zcs->inBuffPos, toLoad, in ZSTD_compressStream_generic() 4211 zcs->inBuff + zcs->inToCompress, iSize) : in ZSTD_compressStream_generic() 4213 zcs->inBuff + zcs->inToCompress, iSize); in ZSTD_compressStream_generic()
|
D | zstd_compress_internal.h | 299 char* inBuff; member
|
/external/zstd/examples/ |
D | streaming_memory_usage.c | 89 ZSTD_inBuffer inBuff = { dataToCompress, sizeof(dataToCompress), 0 }; in main() local 91 CHECK_ZSTD( ZSTD_compressStream(cctx, &outBuff, &inBuff) ); in main() 108 { ZSTD_inBuffer inBuff = { compressedData, compressedSize, 0 }; in main() local 110 size_t const remaining = ZSTD_decompressStream(dctx, &outBuff, &inBuff); in main()
|
/external/lz4/examples/ |
D | frameCompress.c | 59 void* inBuff, size_t inChunkSize, in compress_file_internal() argument 84 size_t const readSize = fread(inBuff, 1, IN_CHUNK_SIZE, f_in); in compress_file_internal() 90 inBuff, readSize, in compress_file_internal()
|
/external/zstd/programs/ |
D | fileio.c | 1318 ZSTD_inBuffer inBuff = { ress.srcBuffer, inSize, 0 }; in FIO_compressZstdFrame() local 1326 while ((inBuff.pos != inBuff.size) /* input buffer must be entirely ingested */ in FIO_compressZstdFrame() 1329 size_t const oldIPos = inBuff.pos; in FIO_compressZstdFrame() 1332 CHECK_V(stillToFlush, ZSTD_compressStream2(ress.cctx, &outBuff, &inBuff, directive)); in FIO_compressZstdFrame() 1336 …if (oldIPos == inBuff.pos) inputBlocked++; /* input buffer is full and can't take any more : inpu… in FIO_compressZstdFrame() 1341 … (unsigned)directive, (unsigned)inBuff.pos, (unsigned)inBuff.size, (unsigned)outBuff.pos); in FIO_compressZstdFrame() 2114 ZSTD_inBuffer inBuff = { ress->srcBuffer, ress->srcBufferLoaded, 0 }; in FIO_decompressZstdFrame() local 2116 size_t const readSizeHint = ZSTD_decompressStream(ress->dctx, &outBuff, &inBuff); in FIO_decompressZstdFrame() 2144 if (inBuff.pos > 0) { in FIO_decompressZstdFrame() 2145 memmove(ress->srcBuffer, (char*)ress->srcBuffer + inBuff.pos, inBuff.size - inBuff.pos); in FIO_decompressZstdFrame() [all …]
|
/external/zstd/lib/decompress/ |
D | zstd_decompress.c | 114 dctx->inBuff = NULL; in ZSTD_initDCtx_internal() 139 dctx->inBuff = (char*)(dctx+1); in ZSTD_initStaticDCtx() 175 ZSTD_customFree(dctx->inBuff, cMem); in ZSTD_freeDCtx() 176 dctx->inBuff = NULL; in ZSTD_freeDCtx() 189 size_t const toCopy = (size_t)((char*)(&dstDCtx->inBuff) - (char*)dstDCtx); in ZSTD_copyDCtx() 1793 ZSTD_customFree(zds->inBuff, zds->customMem); in ZSTD_decompressStream() 1796 zds->inBuff = (char*)ZSTD_customMalloc(bufferSize, zds->customMem); in ZSTD_decompressStream() 1797 RETURN_ERROR_IF(zds->inBuff == NULL, memory_allocation, ""); in ZSTD_decompressStream() 1800 zds->outBuff = zds->inBuff + zds->inBuffSize; in ZSTD_decompressStream() 1838 … loadedSize = ZSTD_limitCopy(zds->inBuff + zds->inPos, toLoad, ip, (size_t)(iend-ip)); in ZSTD_decompressStream() [all …]
|
D | zstd_decompress_internal.h | 142 char* inBuff; member
|
/external/zstd/lib/legacy/ |
D | zstd_v04.c | 3360 char* inBuff; member 3391 free(zbc->inBuff); in ZBUFF_freeDCtx() 3483 free(zbc->inBuff); in ZBUFF_decompressContinue() 3485 zbc->inBuff = (char*)malloc(neededInSize); in ZBUFF_decompressContinue() 3486 if (zbc->inBuff == NULL) return ERROR(memory_allocation); in ZBUFF_decompressContinue() 3498 memcpy(zbc->inBuff, zbc->headerBuffer, zbc->hPos); in ZBUFF_decompressContinue() 3538 loadedSize = ZBUFF_limitCopy(zbc->inBuff + zbc->inPos, toLoad, ip, iend-ip); in ZBUFF_decompressContinue() 3545 zbc->inBuff, neededInSize); in ZBUFF_decompressContinue()
|
D | zstd_v05.c | 3840 char* inBuff; member 3867 free(zbc->inBuff); in ZBUFFv05_freeDCtx() 3948 free(zbc->inBuff); in ZBUFFv05_decompressContinue() 3950 zbc->inBuff = (char*)malloc(neededInSize); in ZBUFFv05_decompressContinue() 3951 if (zbc->inBuff == NULL) return ERROR(memory_allocation); in ZBUFFv05_decompressContinue() 3961 memcpy(zbc->inBuff, zbc->headerBuffer, zbc->hPos); in ZBUFFv05_decompressContinue() 3999 loadedSize = ZBUFFv05_limitCopy(zbc->inBuff + zbc->inPos, toLoad, ip, iend-ip); in ZBUFFv05_decompressContinue() 4006 zbc->inBuff, neededInSize); in ZBUFFv05_decompressContinue()
|
D | zstd_v06.c | 3956 char* inBuff; member 3983 free(zbd->inBuff); in ZBUFFv06_freeDCtx() 4065 free(zbd->inBuff); in ZBUFFv06_decompressContinue() 4067 zbd->inBuff = (char*)malloc(blockSize); in ZBUFFv06_decompressContinue() 4068 if (zbd->inBuff == NULL) return ERROR(memory_allocation); in ZBUFFv06_decompressContinue() 4106 loadedSize = ZBUFFv06_limitCopy(zbd->inBuff + zbd->inPos, toLoad, ip, iend-ip); in ZBUFFv06_decompressContinue() 4114 zbd->inBuff, neededInSize); in ZBUFFv06_decompressContinue()
|
D | zstd_v07.c | 4321 char* inBuff; member 4365 if (zbd->inBuff) zbd->customMem.customFree(zbd->customMem.opaque, zbd->inBuff); in ZBUFFv07_freeDCtx() 4449 zbd->customMem.customFree(zbd->customMem.opaque, zbd->inBuff); in ZBUFFv07_decompressContinue() 4451 … zbd->inBuff = (char*)zbd->customMem.customAlloc(zbd->customMem.opaque, blockSize); in ZBUFFv07_decompressContinue() 4452 if (zbd->inBuff == NULL) return ERROR(memory_allocation); in ZBUFFv07_decompressContinue() 4492 loadedSize = ZBUFFv07_limitCopy(zbd->inBuff + zbd->inPos, toLoad, ip, iend-ip); in ZBUFFv07_decompressContinue() 4501 zbd->inBuff, neededInSize); in ZBUFFv07_decompressContinue()
|