A serializer for typed data in the Drift infrastructure.
This is an alternative to WaveletBuffer that uses a different serialization format which is suitable for non-floating point data.
- Supports all integer types
- Supports all floating point types
- Supports UTF-8 strings
- Supports vectors and matrices of all supported types
- CMake >= 3.16
- C++17 compiler
- conan >= 1.56, < 2.0
#include <drift_bytes/bytes.h>
#include <iostream>
using drift_bytes::InputBuffer;
using drift_bytes::OutputBuffer;
using drift_bytes::Variant;
int main() {
Variant some_value{42};
OutputBuffer buffer(1);
buffer[0] = some_value;
InputBuffer input(buffer.str());
Variant new_val = input[0];
std::cout << new_val << std::endl;
}
mkdir build && cd build
conan install ../conan --build=missing -of .
cmake .. -DCMAKE_TOOLCHAIN_FILE=./build/Release/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .