mcpp index

compat.xxhash

#include

Extremely fast non-cryptographic hash algorithm (XXH32/XXH64/XXH3)

#include <xxhash.h>
mcpp add compat.xxhash@0.8.3

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// Behavioral test: the digests themselves, against upstream's own vectors.
//
// A hash package that links but computes a different value is worse than one
// that does not link at all — every caller downstream is content-addressing
// something. So the assertions here are known-answer tests taken verbatim from
// xxHash's `tests/sanity_test_vectors.h`, together with the buffer generator
// from `tests/sanity_test.c` that those vectors were computed over. Nothing is
// derived from running the code under test.
//
// The lengths cover every size branch XXH3 switches on (0, 1-3, 4-8, 9-16,
// 17-128, 129-240, >240) plus the multi-block path at 2048 and 4160, which is
// where a mis-selected SIMD variant or a byte-order slip would show up.
#include <xxhash.h>

#include <cassert>
#include <cstddef>
#include <cstdint>
#include <vector>

namespace {

// tests/sanity_test.c: fillTestBuffer(). "Its values must not be changed."
// …

tests/examples/xxhash/tests/digest.cpp · 项目 tests/examples/xxhash

构建

targets
xxhash (lib)
language
c++23
C standard
c11
import std
no
include dirs
*

源文件 (1)

  • */xxhash.c

版本

版本平台 镜像sha256
0.8.3 最新 LinuxWindowsmacOS GLOBAL CN aae608dfe821…