Lines Matching full:1
41 # define _POSIX_SOURCE 1 /* disable %llu warnings with MinGW on Windows */
66 #define KB *(1 <<10)
67 #define MB *(1 <<20)
68 #define GB *(1U<<30)
95 static int g_displayLevel = 0; /* 0 : no display ; 1: errors ; 2 : + result + interaction + war…
106 #define LZ4IO_STATIC_ASSERT(c) { enum { LZ4IO_static_assert = 1/(int)(!!(c)) }; } /* use after …
140 DISPLAYLEVEL(1, "Error %i : ", error); \
141 DISPLAYLEVEL(1, __VA_ARGS__); \
142 DISPLAYLEVEL(1, " \n"); \
165 ret->overwrite = 1; in LZ4IO_defaultPreferences()
170 ret->streamChecksum = 1; in LZ4IO_defaultPreferences()
171 ret->blockIndependence = 1; in LZ4IO_defaultPreferences()
172 ret->sparseFileSupport = 1; in LZ4IO_defaultPreferences()
194 /* Default setting : passThrough = 0; return : passThrough mode (0/1) */
202 /* Default setting : overwrite = 1; return : overwrite mode (0/1) */
209 /* Default setting : testMode = 0; return : testMode (0/1) */
219 static const size_t blockSizeTable[] = { 64 KB, 256 KB, 1 MB, 4 MB }; in LZ4IO_setBlockSizeID()
237 /* find which of { 64k, 256k, 1MB, 4MB } is closest to blockSize */ in LZ4IO_setBlockSize()
245 /* Default setting : 1 == independent blocks */
259 /* Default setting : 1 == checksum enabled */
273 /* Default setting : 1 (auto: enabled on file, disabled on stdout) */
322 if ( f==NULL ) DISPLAYLEVEL(1, "%s: %s \n", srcFileName, strerror(errno)); in LZ4IO_openSrcFile()
341 if (prefs->sparseFileSupport==1) { in LZ4IO_openDstFile()
350 if (g_displayLevel <= 1) { /* No interaction possible */ in LZ4IO_openDstFile()
363 if (f==NULL) DISPLAYLEVEL(1, "%s: %s\n", dstFileName, strerror(errno)); in LZ4IO_openDstFile()
385 dstPtr[1] = (unsigned char)(value32 >> 8); in LZ4IO_writeLE32()
393 return LZ4_compress_fast(src, dst, srcSize, dstSize, 1); in LZ4IO_LZ4_compress()
432 if (fwrite(out_buff, 1, MAGICNUMBER_SIZE, foutput) != MAGICNUMBER_SIZE) in LZ4IO_compressFilename_Legacy()
436 while (1) { in LZ4IO_compressFilename_Legacy()
439 size_t const inSize = fread(in_buff, (size_t)1, (size_t)LEGACY_BLOCKSIZE, finput); in LZ4IO_compressFilename_Legacy()
455 if (fwrite(out_buff, 1, (size_t)outSize+4, foutput) != (size_t)(outSize+4)) { in LZ4IO_compressFilename_Legacy()
462 if (clockEnd==clockStart) clockEnd+=1; /* avoid division by zero (speed) */ in LZ4IO_compressFilename_Legacy()
508 if (ofnSize <= ifnSize+suffixSize+1) { in LZ4IO_compressMultipleFilenames_Legacy()
567 readSize = fread(circularBuf + dictEnd, 1, circularBufSize - dictEnd, dictFile); in LZ4IO_createDict()
586 dictBuf = (char *)malloc(dictLen ? dictLen : 1); in LZ4IO_createDict()
647 * 1 : missing or pb opening srcFileName
667 if (srcFile == NULL) return 1; in LZ4IO_compressFilename_extRess()
669 if (dstFile == NULL) { fclose(srcFile); return 1; } in LZ4IO_compressFilename_extRess()
673 prefs.autoFlush = 1; in LZ4IO_compressFilename_extRess()
688 readSize = fread(srcBuffer, (size_t)1, blockSize, srcFile); in LZ4IO_compressFilename_extRess()
703 if (fwrite(dstBuffer, 1, cSize, dstFile) != cSize) { in LZ4IO_compressFilename_extRess()
714 if (fwrite(dstBuffer, 1, headerSize, dstFile) != headerSize) in LZ4IO_compressFilename_extRess()
728 if (fwrite(dstBuffer, 1, outSize, dstFile) != outSize) in LZ4IO_compressFilename_extRess()
732 readSize = fread(srcBuffer, (size_t)1, (size_t)blockSize, srcFile); in LZ4IO_compressFilename_extRess()
741 if (fwrite(dstBuffer, 1, endSize, dstFile) != endSize) in LZ4IO_compressFilename_extRess()
823 if (ofnSize <= ifnSize+suffixSize+1) { in LZ4IO_compressMultipleFilenames()
856 value32 += (unsigned)srcPtr[1] << 8; in LZ4IO_readLE32()
870 const size_t maskT = sizeT -1 ; in LZ4IO_fwriteSparse()
879 size_t const sizeCheck = fwrite(buffer, 1, bufferSize, file); in LZ4IO_fwriteSparse()
885 if (storedSkips > 1 GB) { in LZ4IO_fwriteSparse()
886 int const seekResult = UTIL_fseek(file, 1 GB, SEEK_CUR); in LZ4IO_fwriteSparse()
887 if (seekResult != 0) EXM_THROW(71, "1 GB skip error (sparse file support)"); in LZ4IO_fwriteSparse()
888 storedSkips -= 1 GB; in LZ4IO_fwriteSparse()
926 { size_t const sizeCheck = fwrite(restPtr, 1, (size_t)(restEnd - restPtr), file); in LZ4IO_fwriteSparse()
937 const char lastZeroByte[1] = { 0 }; in LZ4IO_fwriteSparseEnd()
938 if (UTIL_fseek(file, storedSkips-1, SEEK_CUR) != 0) in LZ4IO_fwriteSparseEnd()
940 if (fwrite(lastZeroByte, 1, 1, file) != 1) in LZ4IO_fwriteSparseEnd()
958 while (1) { in LZ4IO_decodeLegacyStream()
962 { size_t const sizeCheck = fread(in_buff, 1, 4, finput); in LZ4IO_decodeLegacyStream()
973 { size_t const sizeCheck = fread(in_buff, 1, blockSize, finput); in LZ4IO_decodeLegacyStream()
1076 readSize = fread(ress.srcBuffer, 1, nextToLoad, srcFile); in LZ4IO_decompressLZ4F()
1121 size_t readBytes = 1; in LZ4IO_passThrough()
1125 if (fwrite(MNstore, 1, MAGICNUMBER_SIZE, foutput) != MAGICNUMBER_SIZE) { in LZ4IO_passThrough()
1129 readBytes = fread(buffer, 1, sizeof(buffer), finput); in LZ4IO_passThrough()
1143 const unsigned stepMax = 1U << 30; in fseek_u32()
1146 if (where != SEEK_CUR) return -1; /* Only allows SEEK_CUR */ in fseek_u32()
1157 #define ENDOFSTREAM ((unsigned long long)-1)
1175 size_t const nbReadBytes = fread(MNstore, 1, MAGICNUMBER_SIZE, finput); in selectDecoder()
1193 { size_t const nbReadBytes = fread(MNstore, 1, 4, finput); in selectDecoder()
1205 if (nbFrames == 1) { /* just started */ in selectDecoder()
1206 /* Wrong magic number at the beginning of 1st stream */ in selectDecoder()
1215 if (position != -1L) in selectDecoder()
1234 if (finput==NULL) return 1; in LZ4IO_decompressSrcFile()
1269 if (foutput==NULL) return 1; /* failure */ in LZ4IO_decompressDstFile()
1273 stat_result = 1; in LZ4IO_decompressDstFile()
1331 if (ofnSize <= ifnSize-suffixSize+1) { in LZ4IO_decompressMultipleFilenames()
1338 …DISPLAYLEVEL(1, "File extension doesn't match expected LZ4_EXTENSION (%4s); will not process file:… in LZ4IO_decompressMultipleFilenames()
1381 #define LZ4IO_INIT_CFILEINFO { NULL, 0ULL, 0, LZ4IO_INIT_FRAMEINFO, 1, 1, 1 }
1401 if (!fread(blockInfo, 1, LZ4F_BLOCK_HEADER_SIZE, finput)) { in LZ4IO_skipBlocksData()
1440 if (!fread(blockInfo, 1, LZIO_LEGACY_BLOCK_HEADER_SIZE, finput)) { in LZ4IO_skipLegacyBlocksData()
1469 buffer[1] = (char)(sizeID + '0'); in LZ4IO_blockTypeID()
1491 return b + 1; in LZ4IO_baseName()
1513 { size_t const nbReadBytes = fread(buffer, 1, MAGICNUMBER_SIZE, finput); in LZ4IO_getCompressedFileInfo()
1527 …{ const size_t readBytes = fread(buffer + MAGICNUMBER_SIZE, 1, LZ4F_HEADER_SIZE_MIN - MAGICNUMBE… in LZ4IO_getCompressedFileInfo()
1534 …const size_t readBytes = fread(buffer + LZ4F_HEADER_SIZE_MIN, 1, hSize - LZ4F_HEADER_SIZE_MIN, fin… in LZ4IO_getCompressedFileInfo()
1554 cfinfo->frameCount + 1, in LZ4IO_getCompressedFileInfo()
1583 cfinfo->frameCount + 1, in LZ4IO_getCompressedFileInfo()
1596 { size_t const nbReadBytes = fread(buffer, 1, 4, finput); in LZ4IO_getCompressedFileInfo()
1605 cfinfo->frameCount + 1, in LZ4IO_getCompressedFileInfo()
1615 if (position != -1L) in LZ4IO_getCompressedFileInfo()
1643 DISPLAYLEVEL(1, "lz4: %s is not a regular file \n", inFileNames[idx]); in LZ4IO_displayCompressedFilesInfo()
1646 …DISPLAYLEVEL(3, "%s(%llu/%llu)\n", cfinfo.fileName, (unsigned long long)idx + 1, (unsigned long l… in LZ4IO_displayCompressedFilesInfo()
1652 DISPLAYLEVEL(1, "lz4: %s: File format not recognized \n", inFileNames[idx]); in LZ4IO_displayCompressedFilesInfo()
1664 LZ4IO_toHuman((long double)cfinfo.fileSize, buffers[1]), in LZ4IO_displayCompressedFilesInfo()