17#include <unordered_map>
40 template <IsCopyable T>
43 Read(data,
sizeof(
T));
53 Read(&temp,
sizeof(uint64_t));
63 while ((
bool)(p[i++]))
82 void Read(std::list<T>* container)
91 container->resize(size);
92 for (
auto& iter : *container)
99 void Read(std::vector<T>* container)
108 container->resize((
size_t)size);
109 for (
auto& iter : *container)
124 str->resize((
size_t)size);
125 for (
auto& iter : *str)
131 template <
typename K,
typename V>
132 void Read(std::map<K, V>* container)
141 for (
size_t i = 0; i < size; ++i)
147 (*container)[key] = value;
151 template <
typename K,
typename V>
152 void Read(std::unordered_map<K, V>* container)
161 for (
size_t i = 0; i < size; ++i)
167 (*container)[key] = value;
173 bool Read(
void* data,
size_t byte_count);
180 bool LoadFromFile(std::string_view path_name,
bool decompress =
false,
size_t length = 0);
189 return _buf.data() + _head;
std::span< std::byte > BufferView
void log_warn0(std::string_view str, const std::source_location location=std::source_location::current())
std::vector< std::byte > Buffer
constexpr size_t SIZE_STREAM_INPUT_CONTAINER_CHECK