From b333b06772c89d96aacb5490d6a219fba7c09cc6 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Thu, 12 Feb 2026 20:57:17 +0100 Subject: Engage! --- llama.cpp/src/llama-io.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 llama.cpp/src/llama-io.cpp (limited to 'llama.cpp/src/llama-io.cpp') diff --git a/llama.cpp/src/llama-io.cpp b/llama.cpp/src/llama-io.cpp new file mode 100644 index 0000000..7ad70d1 --- /dev/null +++ b/llama.cpp/src/llama-io.cpp @@ -0,0 +1,15 @@ +#include "llama-io.h" + +void llama_io_write_i::write_string(const std::string & str) { + uint32_t str_size = str.size(); + + write(&str_size, sizeof(str_size)); + write(str.data(), str_size); +} + +void llama_io_read_i::read_string(std::string & str) { + uint32_t str_size; + read_to(&str_size, sizeof(str_size)); + + str.assign((const char *) read(str_size), str_size); +} -- cgit v1.2.3