Lines Matching refs:ress
615 cRess_t ress; in LZ4IO_createCResources() local
617 LZ4F_errorCode_t const errorCode = LZ4F_createCompressionContext(&(ress.ctx), LZ4F_VERSION); in LZ4IO_createCResources()
621 ress.srcBuffer = malloc(blockSize); in LZ4IO_createCResources()
622 ress.srcBufferSize = blockSize; in LZ4IO_createCResources()
623 ress.dstBufferSize = LZ4F_compressFrameBound(blockSize, NULL); /* cover worst case */ in LZ4IO_createCResources()
624 ress.dstBuffer = malloc(ress.dstBufferSize); in LZ4IO_createCResources()
625 if (!ress.srcBuffer || !ress.dstBuffer) EXM_THROW(31, "Allocation error : not enough memory"); in LZ4IO_createCResources()
627 ress.cdict = LZ4IO_createCDict(prefs); in LZ4IO_createCResources()
629 return ress; in LZ4IO_createCResources()
632 static void LZ4IO_freeCResources(cRess_t ress) in LZ4IO_freeCResources() argument
634 free(ress.srcBuffer); in LZ4IO_freeCResources()
635 free(ress.dstBuffer); in LZ4IO_freeCResources()
637 LZ4F_freeCDict(ress.cdict); in LZ4IO_freeCResources()
638 ress.cdict = NULL; in LZ4IO_freeCResources()
640 { LZ4F_errorCode_t const errorCode = LZ4F_freeCompressionContext(ress.ctx); in LZ4IO_freeCResources()
650 LZ4IO_compressFilename_extRess(cRess_t ress, in LZ4IO_compressFilename_extRess() argument
657 void* const srcBuffer = ress.srcBuffer; in LZ4IO_compressFilename_extRess()
658 void* const dstBuffer = ress.dstBuffer; in LZ4IO_compressFilename_extRess()
659 const size_t dstBufferSize = ress.dstBufferSize; in LZ4IO_compressFilename_extRess()
662 LZ4F_compressionContext_t ctx = ress.ctx; /* just a pointer */ in LZ4IO_compressFilename_extRess()
695 …F_compressFrame_usingCDict(ctx, dstBuffer, dstBufferSize, srcBuffer, readSize, ress.cdict, &prefs); in LZ4IO_compressFilename_extRess()
712 …size_t const headerSize = LZ4F_compressBegin_usingCDict(ctx, dstBuffer, dstBufferSize, ress.cdict,… in LZ4IO_compressFilename_extRess()
778 cRess_t const ress = LZ4IO_createCResources(prefs); in LZ4IO_compressFilename() local
780 …int const result = LZ4IO_compressFilename_extRess(ress, srcFileName, dstFileName, compressionLevel… in LZ4IO_compressFilename()
783 LZ4IO_freeCResources(ress); in LZ4IO_compressFilename()
809 cRess_t ress; in LZ4IO_compressMultipleFilenames() local
812 ress = LZ4IO_createCResources(prefs); in LZ4IO_compressMultipleFilenames()
818 missed_files += LZ4IO_compressFilename_extRess(ress, in LZ4IO_compressMultipleFilenames()
828 LZ4IO_freeCResources(ress); in LZ4IO_compressMultipleFilenames()
834 missed_files += LZ4IO_compressFilename_extRess(ress, in LZ4IO_compressMultipleFilenames()
840 LZ4IO_freeCResources(ress); in LZ4IO_compressMultipleFilenames()
1007 static void LZ4IO_loadDDict(dRess_t* ress, const LZ4IO_prefs_t* const prefs) in LZ4IO_loadDDict() argument
1010 ress->dictBuffer = NULL; in LZ4IO_loadDDict()
1011 ress->dictBufferSize = 0; in LZ4IO_loadDDict()
1015 ress->dictBuffer = LZ4IO_createDict(&ress->dictBufferSize, prefs->dictionaryFilename); in LZ4IO_loadDDict()
1016 if (!ress->dictBuffer) EXM_THROW(25, "Dictionary error : could not create dictionary"); in LZ4IO_loadDDict()
1022 dRess_t ress; in LZ4IO_createDResources() local
1025 LZ4F_errorCode_t const errorCode = LZ4F_createDecompressionContext(&ress.dCtx, LZ4F_VERSION); in LZ4IO_createDResources()
1029 ress.srcBufferSize = LZ4IO_dBufferSize; in LZ4IO_createDResources()
1030 ress.srcBuffer = malloc(ress.srcBufferSize); in LZ4IO_createDResources()
1031 ress.dstBufferSize = LZ4IO_dBufferSize; in LZ4IO_createDResources()
1032 ress.dstBuffer = malloc(ress.dstBufferSize); in LZ4IO_createDResources()
1033 if (!ress.srcBuffer || !ress.dstBuffer) EXM_THROW(61, "Allocation error : not enough memory"); in LZ4IO_createDResources()
1035 LZ4IO_loadDDict(&ress, prefs); in LZ4IO_createDResources()
1037 ress.dstFile = NULL; in LZ4IO_createDResources()
1038 return ress; in LZ4IO_createDResources()
1041 static void LZ4IO_freeDResources(dRess_t ress) in LZ4IO_freeDResources() argument
1043 LZ4F_errorCode_t errorCode = LZ4F_freeDecompressionContext(ress.dCtx); in LZ4IO_freeDResources()
1045 free(ress.srcBuffer); in LZ4IO_freeDResources()
1046 free(ress.dstBuffer); in LZ4IO_freeDResources()
1047 free(ress.dictBuffer); in LZ4IO_freeDResources()
1052 LZ4IO_decompressLZ4F(dRess_t ress, in LZ4IO_decompressLZ4F() argument
1063 LZ4IO_writeLE32(ress.srcBuffer, LZ4IO_MAGICNUMBER); in LZ4IO_decompressLZ4F()
1064 …ToLoad = LZ4F_decompress_usingDict(ress.dCtx, ress.dstBuffer, &outSize, ress.srcBuffer, &inSize, r… in LZ4IO_decompressLZ4F()
1072 size_t decodedBytes = ress.dstBufferSize; in LZ4IO_decompressLZ4F()
1075 if (nextToLoad > ress.srcBufferSize) nextToLoad = ress.srcBufferSize; in LZ4IO_decompressLZ4F()
1076 readSize = fread(ress.srcBuffer, 1, nextToLoad, srcFile); in LZ4IO_decompressLZ4F()
1079 …while ((pos < readSize) || (decodedBytes == ress.dstBufferSize)) { /* still to read, or still to … in LZ4IO_decompressLZ4F()
1082 decodedBytes = ress.dstBufferSize; in LZ4IO_decompressLZ4F()
1083 …4F_decompress_usingDict(ress.dCtx, ress.dstBuffer, &decodedBytes, (char*)(ress.srcBuffer)+pos, &re… in LZ4IO_decompressLZ4F()
1090 …storedSkips = LZ4IO_fwriteSparse(dstFile, ress.dstBuffer, decodedBytes, prefs->sparseFileSupport, … in LZ4IO_decompressLZ4F()
1159 selectDecoder(dRess_t ress, in selectDecoder() argument
1187 return LZ4IO_decompressLZ4F(ress, finput, foutput, prefs); in selectDecoder()
1225 LZ4IO_decompressSrcFile(dRess_t ress, in LZ4IO_decompressSrcFile() argument
1229 FILE* const foutput = ress.dstFile; in LZ4IO_decompressSrcFile()
1240 selectDecoder(ress, finput, foutput, prefs); in LZ4IO_decompressSrcFile()
1262 LZ4IO_decompressDstFile(dRess_t ress, in LZ4IO_decompressDstFile() argument
1275 ress.dstFile = foutput; in LZ4IO_decompressDstFile()
1276 LZ4IO_decompressSrcFile(ress, input_filename, output_filename, prefs); in LZ4IO_decompressDstFile()
1294 dRess_t const ress = LZ4IO_createDResources(prefs); in LZ4IO_decompressFilename() local
1297 int const missingFiles = LZ4IO_decompressDstFile(ress, input_filename, output_filename, prefs); in LZ4IO_decompressFilename()
1303 LZ4IO_freeDResources(ress); in LZ4IO_decompressFilename()
1319 dRess_t ress = LZ4IO_createDResources(prefs); in LZ4IO_decompressMultipleFilenames() local
1322 ress.dstFile = LZ4IO_openDstFile(stdoutmark, prefs); in LZ4IO_decompressMultipleFilenames()
1328 missingFiles += LZ4IO_decompressSrcFile(ress, inFileNamesTable[i], stdoutmark, prefs); in LZ4IO_decompressMultipleFilenames()
1344 missingFiles += LZ4IO_decompressDstFile(ress, inFileNamesTable[i], outFileName, prefs); in LZ4IO_decompressMultipleFilenames()
1347 LZ4IO_freeDResources(ress); in LZ4IO_decompressMultipleFilenames()