![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <BuildPatchHash.h>
Public Member Functions | |
| FRollingHash (uint32 WindowSize) | |
| void | ConsumeByte (const uint8 &NewByte) |
| void | ConsumeBytes (const uint8 *NewBytes, const uint32 &NumBytes) |
| void | RollForward (const uint8 &NewByte) |
| void | Clear () |
| const uint64 | GetWindowHash () const |
| const HashRingBuffer & | GetWindowData () const |
| const uint32 | GetNumDataNeeded () const |
| const uint32 | GetWindowSize () const |
Static Public Member Functions | |
| static uint64 | GetHashForDataSet (const uint8 *DataSet, uint32 WindowSize) |
A class that performs a rolling hash
| FRollingHash::FRollingHash | ( | uint32 | WindowSize | ) |
Constructor
| void FRollingHash::Clear | ( | ) |
Clears all data ready for a new entire data set
Pass this function the initial data set to start the Rolling Hash with.
| NewByte | The byte to add to the hash state |
Helper to consume from a byte array
| NewBytes | The byte array |
| NumBytes | The number of bytes to consume |
Static function to simply return the hash for a given data range.
| DataSet | The buffer to the data. |
| WindowSize | The buffer of length. |
| const uint32 FRollingHash::GetNumDataNeeded | ( | ) | const |
Get how many DataValueType values we still need to consume until our window is full
| const TRingBuffer< uint8 > & FRollingHash::GetWindowData | ( | ) | const |
Get the Ring Buffer for the current window
| const uint64 FRollingHash::GetWindowHash | ( | ) | const |
Get the HashState for the current window
| const uint32 FRollingHash::GetWindowSize | ( | ) | const |
Rolls the window by one byte forwards.
| NewByte | The byte that will be added to the front of the window |