1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Clean up and compress some pre-join packets (#15881)

This commit is contained in:
sfan5 2025-03-11 20:00:07 +01:00 committed by GitHub
parent 287880aa27
commit afb15978d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 260 additions and 102 deletions

View file

@ -469,3 +469,10 @@ std::string serializeJsonStringIfNeeded(std::string_view s);
// Parses a string serialized by serializeJsonStringIfNeeded.
std::string deSerializeJsonStringIfNeeded(std::istream &is);
// Serializes an array of strings (max 2^16 chars each)
// Output is well suited for compression :)
std::string serializeString16Array(const std::vector<std::string> &array);
// Deserializes a string array
std::vector<std::string> deserializeString16Array(std::istream &is);