Lines Matching refs:srcFileName
589 static FILE* FIO_openSrcFile(const char* srcFileName) in FIO_openSrcFile() argument
592 assert(srcFileName != NULL); in FIO_openSrcFile()
593 if (!strcmp (srcFileName, stdinmark)) { in FIO_openSrcFile()
599 if (!UTIL_stat(srcFileName, &statbuf)) { in FIO_openSrcFile()
601 srcFileName, strerror(errno)); in FIO_openSrcFile()
609 srcFileName); in FIO_openSrcFile()
613 { FILE* const f = fopen(srcFileName, "rb"); in FIO_openSrcFile()
615 DISPLAYLEVEL(1, "zstd: %s: %s \n", srcFileName, strerror(errno)); in FIO_openSrcFile()
625 const char* srcFileName, const char* dstFileName) in FIO_openDstFile() argument
641 if (srcFileName != NULL && UTIL_isSameFile(srcFileName, dstFileName)) { in FIO_openDstFile()
681 } else if (srcFileName != NULL in FIO_openDstFile()
682 && strcmp (srcFileName, stdinmark) in FIO_openDstFile()
1022 const char* srcFileName, U64 const srcFileSize, in FIO_compressGzFrame() argument
1039 EXM_THROW(71, "zstd: %s: deflateInit2 error %d \n", srcFileName, ret); in FIO_compressGzFrame()
1058 EXM_THROW(72, "zstd: %s: deflate error %d \n", srcFileName, ret); in FIO_compressGzFrame()
1089 EXM_THROW(77, "zstd: %s: deflate error %d \n", srcFileName, ret); in FIO_compressGzFrame()
1094 EXM_THROW(79, "zstd: %s: deflateEnd error %d \n", srcFileName, ret); in FIO_compressGzFrame()
1105 const char* srcFileName, U64 const srcFileSize, in FIO_compressLzmaFrame() argument
1119 EXM_THROW(81, "zstd: %s: lzma_lzma_preset error", srcFileName); in FIO_compressLzmaFrame()
1122 EXM_THROW(82, "zstd: %s: lzma_alone_encoder error %d", srcFileName, ret); in FIO_compressLzmaFrame()
1126 EXM_THROW(83, "zstd: %s: lzma_easy_encoder error %d", srcFileName, ret); in FIO_compressLzmaFrame()
1146 EXM_THROW(84, "zstd: %s: lzma_code encoding error %d", srcFileName, ret); in FIO_compressLzmaFrame()
1184 const char* srcFileName, U64 const srcFileSize, in FIO_compressLz4Frame() argument
1233 srcFileName, LZ4F_getErrorName(outSize)); in FIO_compressLz4Frame()
1255 if (ferror(ress->srcFile)) EXM_THROW(37, "Error reading %s ", srcFileName); in FIO_compressLz4Frame()
1261 srcFileName, LZ4F_getErrorName(headerSize)); in FIO_compressLz4Frame()
1283 const char* srcFileName, U64 fileSize, in FIO_compressZstdFrame() argument
1311 (void)srcFileName; in FIO_compressZstdFrame()
1366 size_t srcFileNameSize = strlen(srcFileName); in FIO_compressZstdFrame()
1369 const char* truncatedSrcFileName = srcFileName + srcFileNameSize - 15; in FIO_compressZstdFrame()
1374 … fCtx->currFileIdx+1, fCtx->nbFilesTotal, (int)(18-srcFileNameSize), srcFileName); in FIO_compressZstdFrame()
1494 const char* dstFileName, const char* srcFileName, in FIO_compressFilename_internal() argument
1501 U64 const fileSize = UTIL_getFileSize(srcFileName); in FIO_compressFilename_internal()
1502 DISPLAYLEVEL(5, "%s: %u bytes \n", srcFileName, (unsigned)fileSize); in FIO_compressFilename_internal()
1508 …compressedfilesize = FIO_compressZstdFrame(fCtx, prefs, &ress, srcFileName, fileSize, compressionL… in FIO_compressFilename_internal()
1513 …compressedfilesize = FIO_compressGzFrame(&ress, srcFileName, fileSize, compressionLevel, &readsize… in FIO_compressFilename_internal()
1517 srcFileName); in FIO_compressFilename_internal()
1524 …compressedfilesize = FIO_compressLzmaFrame(&ress, srcFileName, fileSize, compressionLevel, &readsi… in FIO_compressFilename_internal()
1528 srcFileName); in FIO_compressFilename_internal()
1534 …compressedfilesize = FIO_compressLz4Frame(&ress, srcFileName, fileSize, compressionLevel, prefs->c… in FIO_compressFilename_internal()
1538 srcFileName); in FIO_compressFilename_internal()
1552 srcFileName, in FIO_compressFilename_internal()
1557 srcFileName, in FIO_compressFilename_internal()
1571 srcFileName, timeLength_s, cpuLoad_pct); in FIO_compressFilename_internal()
1590 const char* srcFileName, in FIO_compressFilename_dstFile() argument
1601 ress.dstFile = FIO_openDstFile(fCtx, prefs, srcFileName, dstFileName); in FIO_compressFilename_dstFile()
1609 if ( strcmp (srcFileName, stdinmark) in FIO_compressFilename_dstFile()
1610 && UTIL_stat(srcFileName, &statbuf) in FIO_compressFilename_dstFile()
1615 …result = FIO_compressFilename_internal(fCtx, prefs, ress, dstFileName, srcFileName, compressionLev… in FIO_compressFilename_dstFile()
1668 const char* srcFileName, in FIO_compressFilename_srcFile() argument
1672 DISPLAYLEVEL(6, "FIO_compressFilename_srcFile: %s \n", srcFileName); in FIO_compressFilename_srcFile()
1675 if (UTIL_isDirectory(srcFileName)) { in FIO_compressFilename_srcFile()
1676 DISPLAYLEVEL(1, "zstd: %s is a directory -- ignored \n", srcFileName); in FIO_compressFilename_srcFile()
1681 if (ress.dictFileName != NULL && UTIL_isSameFile(srcFileName, ress.dictFileName)) { in FIO_compressFilename_srcFile()
1682 DISPLAYLEVEL(1, "zstd: cannot use %s as an input file and dictionary \n", srcFileName); in FIO_compressFilename_srcFile()
1690 …if (prefs->excludeCompressedFiles == 1 && UTIL_isCompressedFile(srcFileName, compressedFileExtensi… in FIO_compressFilename_srcFile()
1691 DISPLAYLEVEL(4, "File is already compressed : %s \n", srcFileName); in FIO_compressFilename_srcFile()
1695 ress.srcFile = FIO_openSrcFile(srcFileName); in FIO_compressFilename_srcFile()
1698 …result = FIO_compressFilename_dstFile(fCtx, prefs, ress, dstFileName, srcFileName, compressionLeve… in FIO_compressFilename_srcFile()
1704 && strcmp(srcFileName, stdinmark) /* exception : don't erase stdin */ in FIO_compressFilename_srcFile()
1710 if (FIO_removeFile(srcFileName)) in FIO_compressFilename_srcFile()
1711 EXM_THROW(1, "zstd: %s: %s", srcFileName, strerror(errno)); in FIO_compressFilename_srcFile()
1717 const char* srcFileName, const char* dictFileName, in FIO_compressFilename() argument
1720 …cRess_t const ress = FIO_createCResources(prefs, dictFileName, UTIL_getFileSize(srcFileName), comp… in FIO_compressFilename()
1721 …int const result = FIO_compressFilename_srcFile(fCtx, prefs, ress, dstFileName, srcFileName, compr… in FIO_compressFilename()
1735 FIO_determineCompressedName(const char* srcFileName, const char* outDirName, const char* suffix) in FIO_determineCompressedName() argument
1740 size_t sfnSize = strlen(srcFileName); in FIO_determineCompressedName()
1743 outDirFilename = FIO_createFilename_fromOutDir(srcFileName, outDirName, srcSuffixLen); in FIO_determineCompressedName()
1763 memcpy(dstFileNameBuffer, srcFileName, sfnSize); in FIO_determineCompressedName()
1827 const char* const srcFileName = inFileNamesTable[fCtx->currFileIdx]; in FIO_compressMultipleFilenames() local
1830 … char* validMirroredDirName = UTIL_createMirroredDestDirName(srcFileName, outMirroredRootDirName); in FIO_compressMultipleFilenames()
1832 … dstFileName = FIO_determineCompressedName(srcFileName, validMirroredDirName, suffix); in FIO_compressMultipleFilenames()
1835 …EVEL(2, "zstd: --output-dir-mirror cannot compress '%s' into '%s' \n", srcFileName, outMirroredRoo… in FIO_compressMultipleFilenames()
1840 … dstFileName = FIO_determineCompressedName(srcFileName, outDirName, suffix); /* cannot fail */ in FIO_compressMultipleFilenames()
1842 …status = FIO_compressFilename_srcFile(fCtx, prefs, ress, dstFileName, srcFileName, compressionLeve… in FIO_compressMultipleFilenames()
2057 size_t err, const char* srcFileName) in FIO_zstdErrorHelp() argument
2072 srcFileName, windowSize, prefs->memLimit); in FIO_zstdErrorHelp()
2077 srcFileName, windowLog, windowMB); in FIO_zstdErrorHelp()
2081 srcFileName, ZSTD_WINDOWLOG_MAX); in FIO_zstdErrorHelp()
2091 const char* srcFileName, in FIO_decompressZstdFrame() argument
2098 { size_t const srcFileLength = strlen(srcFileName); in FIO_decompressZstdFrame()
2099 if (srcFileLength>20) srcFileName += srcFileLength-20; in FIO_decompressZstdFrame()
2119 srcFileName, ZSTD_getErrorName(readSizeHint)); in FIO_decompressZstdFrame()
2120 FIO_zstdErrorHelp(prefs, ress, readSizeHint, srcFileName); in FIO_decompressZstdFrame()
2129 size_t srcFileNameSize = strlen(srcFileName); in FIO_decompressZstdFrame()
2131 const char* truncatedSrcFileName = srcFileName + srcFileNameSize - 15; in FIO_decompressZstdFrame()
2136 …fCtx->currFileIdx+1, fCtx->nbFilesTotal, srcFileName, (unsigned)((alreadyDecoded+frameSize)>>20) ); in FIO_decompressZstdFrame()
2140 srcFileName, (unsigned)((alreadyDecoded+frameSize)>>20) ); in FIO_decompressZstdFrame()
2159 srcFileName); in FIO_decompressZstdFrame()
2175 const char* srcFileName) in FIO_decompressGzFrame() argument
2207 DISPLAYLEVEL(1, "zstd: %s: premature gz end \n", srcFileName); in FIO_decompressGzFrame()
2211 DISPLAYLEVEL(1, "zstd: %s: inflate error %d \n", srcFileName, ret); in FIO_decompressGzFrame()
2230 DISPLAYLEVEL(1, "zstd: %s: inflateEnd error \n", srcFileName); in FIO_decompressGzFrame()
2243 const char* srcFileName, int plain_lzma) in FIO_decompressLzmaFrame() argument
2263 srcFileName, initRet); in FIO_decompressLzmaFrame()
2283 DISPLAYLEVEL(1, "zstd: %s: premature lzma end \n", srcFileName); in FIO_decompressLzmaFrame()
2288 srcFileName, ret); in FIO_decompressLzmaFrame()
2314 const char* srcFileName) in FIO_decompressLz4Frame() argument
2335 srcFileName, LZ4F_getErrorName(nextToLoad)); in FIO_decompressLz4Frame()
2358 srcFileName, LZ4F_getErrorName(nextToLoad)); in FIO_decompressLz4Frame()
2375 DISPLAYLEVEL(1, "zstd: %s: read error \n", srcFileName); in FIO_decompressLz4Frame()
2380 DISPLAYLEVEL(1, "zstd: %s: unfinished lz4 stream \n", srcFileName); in FIO_decompressLz4Frame()
2403 const char* dstFileName, const char* srcFileName) in FIO_decompressFrames() argument
2419 DISPLAYLEVEL(1, "zstd: %s: unexpected end of file \n", srcFileName); in FIO_decompressFrames()
2426 DISPLAYLEVEL(1, "zstd: %s: unknown header \n", srcFileName); in FIO_decompressFrames()
2430 …long const frameSize = FIO_decompressZstdFrame(fCtx, &ress, srcFile, prefs, srcFileName, filesize); in FIO_decompressFrames()
2435 … unsigned long long const frameSize = FIO_decompressGzFrame(&ress, srcFile, prefs, srcFileName); in FIO_decompressFrames()
2439 …s: gzip file cannot be uncompressed (zstd compiled without HAVE_ZLIB) -- ignored \n", srcFileName); in FIO_decompressFrames()
2445 … long const frameSize = FIO_decompressLzmaFrame(&ress, srcFile, prefs, srcFileName, buf[0] != 0xFD… in FIO_decompressFrames()
2449 …xz/lzma file cannot be uncompressed (zstd compiled without HAVE_LZMA) -- ignored \n", srcFileName); in FIO_decompressFrames()
2454 … unsigned long long const frameSize = FIO_decompressLz4Frame(&ress, srcFile, prefs, srcFileName); in FIO_decompressFrames()
2458 … %s: lz4 file cannot be uncompressed (zstd compiled without HAVE_LZ4) -- ignored \n", srcFileName); in FIO_decompressFrames()
2467 DISPLAYLEVEL(1, "zstd: %s: unsupported format \n", srcFileName); in FIO_decompressFrames()
2477 DISPLAYLEVEL(2, "%-20s: %llu bytes \n", srcFileName, filesize); in FIO_decompressFrames()
2494 const char* dstFileName, const char* srcFileName) in FIO_decompressDstFile() argument
2504 ress.dstFile = FIO_openDstFile(fCtx, prefs, srcFileName, dstFileName); in FIO_decompressDstFile()
2513 … if ( strcmp(srcFileName, stdinmark) /* special case : don't transfer permissions from stdin */ in FIO_decompressDstFile()
2514 && UTIL_stat(srcFileName, &statbuf) in FIO_decompressDstFile()
2519 result = FIO_decompressFrames(fCtx, ress, srcFile, prefs, dstFileName, srcFileName); in FIO_decompressDstFile()
2548 …nst fCtx, FIO_prefs_t* const prefs, dRess_t ress, const char* dstFileName, const char* srcFileName) in FIO_decompressSrcFile() argument
2553 if (UTIL_isDirectory(srcFileName)) { in FIO_decompressSrcFile()
2554 DISPLAYLEVEL(1, "zstd: %s is a directory -- ignored \n", srcFileName); in FIO_decompressSrcFile()
2558 srcFile = FIO_openSrcFile(srcFileName); in FIO_decompressSrcFile()
2562 result = FIO_decompressDstFile(fCtx, prefs, ress, srcFile, dstFileName, srcFileName); in FIO_decompressSrcFile()
2566 … DISPLAYLEVEL(1, "zstd: %s: %s \n", srcFileName, strerror(errno)); /* error should not happen */ in FIO_decompressSrcFile()
2571 && strcmp(srcFileName, stdinmark) ) /* not stdin */ { in FIO_decompressSrcFile()
2576 if (FIO_removeFile(srcFileName)) { in FIO_decompressSrcFile()
2578 DISPLAYLEVEL(1, "zstd: %s: %s \n", srcFileName, strerror(errno)); in FIO_decompressSrcFile()
2587 const char* dstFileName, const char* srcFileName, in FIO_decompressFilename() argument
2592 int const decodingError = FIO_decompressSrcFile(fCtx, prefs, ress, dstFileName, srcFileName); in FIO_decompressFilename()
2638 FIO_determineDstName(const char* srcFileName, const char* outDirName) in FIO_determineDstName() argument
2647 size_t sfnSize = strlen(srcFileName); in FIO_determineDstName()
2650 const char* const srcSuffix = strrchr(srcFileName, '.'); in FIO_determineDstName()
2656 srcFileName, suffixListStr); in FIO_determineDstName()
2675 srcFileName, suffixListStr); in FIO_determineDstName()
2686 outDirFilename = FIO_createFilename_fromOutDir(srcFileName, outDirName, 0); in FIO_determineDstName()
2708 memcpy(dstFileNameBuffer, srcFileName, dstFileNameEndPos); in FIO_determineDstName()
2753 const char* const srcFileName = srcNamesTable[fCtx->currFileIdx]; in FIO_decompressMultipleFilenames() local
2756 … char* validMirroredDirName = UTIL_createMirroredDestDirName(srcFileName, outMirroredRootDirName); in FIO_decompressMultipleFilenames()
2758 dstFileName = FIO_determineDstName(srcFileName, validMirroredDirName); in FIO_decompressMultipleFilenames()
2761 …VEL(2, "zstd: --output-dir-mirror cannot decompress '%s' into '%s'\n", srcFileName, outMirroredRoo… in FIO_decompressMultipleFilenames()
2764 dstFileName = FIO_determineDstName(srcFileName, outDirName); in FIO_decompressMultipleFilenames()
2767 status = FIO_decompressSrcFile(fCtx, prefs, ress, dstFileName, srcFileName); in FIO_decompressMultipleFilenames()
2925 getFileInfo(fileInfo_t* info, const char* srcFileName) in getFileInfo() argument
2927 ERROR_IF(!UTIL_isRegularFile(srcFileName), in getFileInfo()
2928 info_file_error, "Error : %s is not a file", srcFileName); in getFileInfo()
2929 return getFileInfo_fileConfirmed(info, srcFileName); in getFileInfo()