Digest-xxHash
view release on metacpan or search on metacpan
ext/xxHash/xxhsum.1.md view on Meta::CPAN
* `-b`:
Benchmark mode. See [EXAMPLES](#EXAMPLES) for details.
* `-B`<BLOCKSIZE>:
Only useful for benchmark mode (`-b`). See [EXAMPLES](#EXAMPLES) for details.
<BLOCKSIZE> specifies benchmark mode's test data block size in bytes.
Default value is 102400
* `-i`<ITERATIONS>:
Only useful for benchmark mode (`-b`). See [EXAMPLES](#EXAMPLES) for details.
<ITERATIONS> specifies number of iterations in benchmark. Single iteration
takes at least 2500 milliseconds. Default value is 3
EXIT STATUS
-----------
`xxhsum` exit `0` on success, `1` if at least one file couldn't be read or
doesn't have the same checksum as the `-c` option.
EXAMPLES
--------
ext/xxHash/xxhsum.c view on Meta::CPAN
#define EXPAND_AND_QUOTE(str) QUOTE(str)
#define PROGRAM_VERSION EXPAND_AND_QUOTE(LIB_VERSION)
static const int g_nbBits = (int)(sizeof(void*)*8);
static const char g_lename[] = "little endian";
static const char g_bename[] = "big endian";
#define ENDIAN_NAME (BMK_isLittleEndian() ? g_lename : g_bename)
#define COMPILED __DATE__
static const char author[] = "Yann Collet";
#define WELCOME_MESSAGE(exename) "%s %s (%i-bits %s), by %s (%s) \n", exename, PROGRAM_VERSION, g_nbBits, ENDIAN_NAME, author, COMPILED
#define NBLOOPS 3 /* Default number of benchmark iterations */
#define TIMELOOP_S 1
#define TIMELOOP (TIMELOOP_S * CLOCKS_PER_SEC) /* Minimum timing per iteration */
#define XXHSUM32_DEFAULT_SEED 0 /* Default seed for algo_xxh32 */
#define XXHSUM64_DEFAULT_SEED 0 /* Default seed for algo_xxh64 */
#define KB *( 1<<10)
#define MB *( 1<<20)
#define GB *(1U<<30)
#define MAX_MEM (2 GB - 64 MB)
ext/xxHash/xxhsum.c view on Meta::CPAN
static int usage_advanced(const char* exename)
{
usage(exename);
DISPLAY( "Advanced :\n");
DISPLAY( " --little-endian : hash printed using little endian convention (default: big endian)\n");
DISPLAY( " -V, --version : display version\n");
DISPLAY( " -h, --help : display long help and exit\n");
DISPLAY( " -b : benchmark mode \n");
DISPLAY( " -i# : number of iterations (benchmark mode; default %i)\n", g_nbIterations);
DISPLAY( "\n");
DISPLAY( "The following four options are useful only when verifying checksums (-c):\n");
DISPLAY( "--strict : don't print OK for each successfully verified file\n");
DISPLAY( "--status : don't output anything, status code shows success\n");
DISPLAY( "--quiet : exit non-zero for improperly formatted checksum lines\n");
DISPLAY( "--warn : warn about improperly formatted checksum lines\n");
return 0;
}
static int badusage(const char* exename)
( run in 0.598 second using v1.01-cache-2.11-cpan-71847e10f99 )