| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .. | ||
| Ben.mq5 | ||
| BitFastBuffer.mqh | ||
| Def.mqh | ||
| Hash.mqh | ||
| HMTest.mq5 | ||
| README.md | ||
| Test.mq5 | ||
Utils/Bits
Bit manipulation, fast serialization buffers, and hashing support used by the ecosystem's hash maps.
Main features
- Fast write-oriented bit buffer: booleans, integers, arrays, doubles, floats, padded strings (
CBitBufferinBitFastBuffer.mqh). - Little-endian / big-endian byte (de)serialization (
FromBytesLE,FromBytesBE,ToBytes). - Generic hash + equality implementation for
CBitBuffer, so it can be used as a key inTSNhash maps (TSN::CGenericHash_CBitBufferinHash.mqh, built on XXH64).
Basic usage
CBitBuffer bit;
bit.WriteBool(true);
bit.WriteInteger(42);
bit.WriteDouble(3.14);
uchar buf[];
int written = bit.ToBytes(buf);
// Using CBitBuffer as a hash map key:
TSN::CHashMapFastNor<TSN::CBitBuffer, int, TSN::CGenericHash_CBitBuffer> cache;
Only the most representative methods are shown here.