Sen API
Sen Libraries
Loading...
Searching...
No Matches
Hashing and compression

Hashing and compression utilities. More...

Collaboration diagram for Hashing and compression:

Classes

class  sen::GradientNoise< FloatType, dimensionCount >
 Utility class for generating n-dimensional noise. Mainly useful in tests and examples. More...

Functions

template<typename InputIterator>
u32 sen::crc32 (InputIterator first, InputIterator last) noexcept
 Calculates the CRC32 for any sequence of values. (You could use type traits and a static assert to ensure the values can be converted to 8 bits.).
u32 sen::crc32 (std::string_view str) noexcept
 CRC32 for strings.
template<typename... Types>
u32 sen::hashCombine (u32 seed, const Types &... args) noexcept
 Combines the hash of different values into a single 32-bit hash.
template<typename... Types>
uint_fast32_t sen::platformDependentHashCombine (uint_fast32_t seed, const Types &... args) noexcept
 Old version of the hashCombine method. The current one replaced this implementation to allow sen processes to discover and connect themselves between platforms (Windows and Linux). We keep this old implementation to enable replaying Sen recordings generated with the old hashes.
unsigned char * sen::decompressSymbol (const void *compressedData)
 Decompresses a blob into its original shape.
std::string sen::decompressSymbolToString (const void *compressedData, unsigned int originalSize)
 Decompresses a blob into a string.
bool sen::fileToCompressedArrayFile (const std::filesystem::path &inputFile, std::string_view symbolName, const std::filesystem::path &outputFile)
 Creates a C++ source file that contains an array representing the contents of another file.

Variables

constexpr u32 sen::hashSeed = 23835769U
 Initial seed for all hashes.
constexpr u32 sen::propertyHashSeed = 19830715U
constexpr u32 sen::methodHashSeed = 93580253U
constexpr u32 sen::eventHashSeed = 12125807U
constexpr u32 sen::nonPresentTypeHash = 18121997U
 This hash is combined when no Type is found in a certain spec.

Detailed Description

Hashing and compression utilities.

Function Documentation

◆ crc32() [1/2]

template<typename InputIterator>
u32 sen::crc32 ( InputIterator first,
InputIterator last )
inlinenodiscardnoexcept

Calculates the CRC32 for any sequence of values. (You could use type traits and a static assert to ensure the values can be converted to 8 bits.).

◆ crc32() [2/2]

u32 sen::crc32 ( std::string_view str)
inlinenodiscardnoexcept

CRC32 for strings.

◆ hashCombine()

template<typename... Types>
u32 sen::hashCombine ( u32 seed,
const Types &... args )
inlinenodiscardnoexcept

Combines the hash of different values into a single 32-bit hash.

◆ platformDependentHashCombine()

template<typename... Types>
uint_fast32_t sen::platformDependentHashCombine ( uint_fast32_t seed,
const Types &... args )
nodiscardnoexcept

Old version of the hashCombine method. The current one replaced this implementation to allow sen processes to discover and connect themselves between platforms (Windows and Linux). We keep this old implementation to enable replaying Sen recordings generated with the old hashes.

◆ decompressSymbol()

unsigned char * sen::decompressSymbol ( const void * compressedData)

Decompresses a blob into its original shape.

◆ decompressSymbolToString()

std::string sen::decompressSymbolToString ( const void * compressedData,
unsigned int originalSize )
nodiscard

Decompresses a blob into a string.

◆ fileToCompressedArrayFile()

bool sen::fileToCompressedArrayFile ( const std::filesystem::path & inputFile,
std::string_view symbolName,
const std::filesystem::path & outputFile )
nodiscard

Creates a C++ source file that contains an array representing the contents of another file.

Variable Documentation

◆ hashSeed

u32 sen::hashSeed = 23835769U
constexpr

Initial seed for all hashes.

◆ propertyHashSeed

u32 sen::propertyHashSeed = 19830715U
constexpr

◆ methodHashSeed

u32 sen::methodHashSeed = 93580253U
constexpr

◆ eventHashSeed

u32 sen::eventHashSeed = 12125807U
constexpr

◆ nonPresentTypeHash

u32 sen::nonPresentTypeHash = 18121997U
constexpr

This hash is combined when no Type is found in a certain spec.