profile
viewpoint

Ask questionsEasier implementation for software running on "normal" architectures

I wish there was a simplified implementation of xxhash, in a single cpp file, without #ifdef, a ~6KB file instead of ~145KB

Something like this https://create.stephan-brumme.com/xxhash/ but for XXH3 (the 128 bit version), just to get (snippet)

    XXH3_state_t state128;
    (void)XXH3_128bits_reset(&state128);
	
	size_t readSize;
	while ((readSize = fread(buffer, 1, blockSize, inFile)) > 0) 
	{
		(void)XXH3_128bits_update(&state128, buffer, readSize);
	}

In fact, I find it particularly difficult to debug other programs in which XXH3 is "integrated", it is really difficult to understand the interaction of all the #ifdefs.

Often you have "normal" environments (x86 / x64 machines) in which to use xxhash (actually a great program, when ... it works!)

I'm having trouble with a software that compiles and works fine with gcc on Windows and FreeBSD but not Linux, due to XXH3_state_t

Thank you

Cyan4973/xxHash

Answer questions Cyan4973

I wish there was a simplified implementation of xxhash, in a single cpp file, without #ifdef, a ~6KB file

I wish it too. I like Stefan's variants.

Problem is, it would violate one of the rules of this repository, which is "one xxhash.h file for all", on the ground that it's easier to integrate.

The objective is not all lost though. We could consider smaller specialized files, which are then aggregated into a single xxhash.h file. This way, both approaches (small specialized files + single file for all) would be possible.

However, this is a complex goal, and I don't see that happening on short term. For your immediate needs, better consider a fix.

I'm having trouble with a software that compiles and works fine with gcc on Windows and FreeBSD but not Linux, due to XXH3_state_t

Could you please describe your issue ?

XXH3 is supposed to work fine on Linux. It's actually continuously tested on Linux.

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List