Lines Matching defs:finput
422 FILE* const finput = LZ4IO_openSrcFile(input_filename);
428 if (finput == NULL)
433 fclose(finput);
452 size_t const inSize = fread(in_buff, (size_t)1, (size_t)LEGACY_BLOCKSIZE, finput);
471 if (ferror(finput)) END_PROCESS(24, "Error while reading %s ", input_filename);
488 fclose(finput);
962 LZ4IO_decodeLegacyStream(FILE* finput, FILE* foutput, const LZ4IO_prefs_t* prefs)
977 { size_t const sizeCheck = fread(in_buff, 1, LZ4IO_LEGACY_BLOCK_HEADER_SIZE, finput);
989 { size_t const sizeCheck = fread(in_buff, 1, blockSize, finput);
999 if (ferror(finput)) END_PROCESS(55, "Read error : ferror");
1141 * MNstore : contain the first MAGICNUMBER_SIZE bytes already read from finput
1146 LZ4IO_passThrough(FILE* finput, FILE* foutput,
1159 readBytes = fread(buffer, 1, sizeof(buffer), finput);
1163 if (ferror(finput)) END_PROCESS(51, "Read Error");
1210 FILE* finput, FILE* foutput,
1221 if (g_magicRead) { /* magic number already read from finput (see legacy frame)*/
1225 size_t const nbReadBytes = fread(MNstore, 1, MAGICNUMBER_SIZE, finput);
1237 return LZ4IO_decompressLZ4F(ress, finput, foutput, prefs);
1240 return LZ4IO_decodeLegacyStream(finput, foutput, prefs);
1243 { size_t const nbReadBytes = fread(MNstore, 1, 4, finput);
1248 int const errorNb = fseek_u32(finput, size, SEEK_CUR);
1258 return LZ4IO_passThrough(finput, foutput, MNstore, prefs->sparseFileSupport);
1262 { long int const position = ftell(finput); /* only works for files < 2 GB */
1283 FILE* const finput = LZ4IO_openSrcFile(input_filename);
1284 if (finput==NULL) return 1;
1290 selectDecoder(ress, finput, foutput, prefs);
1297 fclose(finput);
1453 LZ4IO_skipBlocksData(FILE* finput,
1460 if (!fread(blockInfo, 1, LZ4F_BLOCK_HEADER_SIZE, finput)) {
1461 if (feof(finput)) return totalBlocksSize;
1471 if (UTIL_fseek(finput, LZ4F_CONTENT_CHECKSUM_SIZE, SEEK_CUR) != 0) {
1481 if (UTIL_fseek(finput, (long)nextBlock, SEEK_CUR) != 0) return 0;
1494 static unsigned long long LZ4IO_skipLegacyBlocksData(FILE* finput)
1500 size_t const bhs = fread(blockInfo, 1, LZ4IO_LEGACY_BLOCK_HEADER_SIZE, finput);
1502 if (feof(finput)) return totalBlocksSize;
1513 if (UTIL_fseek(finput, -LZ4IO_LEGACY_BLOCK_HEADER_SIZE, SEEK_CUR) != 0) {
1524 * note : this won't fail if nextCBlockSize is too large, skipping past the end of finput */
1525 if (UTIL_fseek(finput, nextCBlockSize, SEEK_CUR) != 0) {
1573 FILE* const finput = LZ4IO_openSrcFile(input_filename);
1575 if (finput == NULL) return LZ4IO_not_a_file;
1576 cfinfo->fileSize = UTIL_getOpenFileSize(finput);
1578 while (!feof(finput)) {
1582 { size_t const nbReadBytes = fread(buffer, 1, MAGICNUMBER_SIZE, finput);
1596 { const size_t readBytes = fread(buffer + MAGICNUMBER_SIZE, 1, LZ4F_HEADER_SIZE_MIN - MAGICNUMBER_SIZE, finput);
1597 if (!readBytes || ferror(finput)) END_PROCESS(71, "Error reading %s", input_filename);
1603 const size_t readBytes = fread(buffer + LZ4F_HEADER_SIZE_MIN, 1, hSize - LZ4F_HEADER_SIZE_MIN, finput);
1604 if (!readBytes || ferror(finput)) END_PROCESS(72, "Error reading %s", input_filename);
1616 { const unsigned long long totalBlocksSize = LZ4IO_skipBlocksData(finput,
1649 { const unsigned long long totalBlocksSize = LZ4IO_skipLegacyBlocksData(finput);
1670 { size_t const nbReadBytes = fread(buffer, 1, 4, finput);
1675 int const errorNb = fseek_u32(finput, size, SEEK_CUR);
1687 { long int const position = ftell(finput); /* only works for files < 2 GB */
1699 } /* while (!feof(finput)) */
1700 fclose(finput);