How to avoid non-friendly UTF8 characters from String.pack for remote events?

I can’t find it now, but I got the idea that remote event data size in bytes was just the string length of the JsonEncoded data

I’m currently compressing a number down to 2 bytes, but if remote events jsonEncode before sending, I’m not really saving much bandwith.
image

And in some cases it actually makes it worse.
image

  1. Do remote events use JsonEncoding before sending data

  2. And if so how can I avoid using characters from string.pack() that add an extra 5 bytes?

For anyone who stumbles upon this with a similar question:

Use the new buffer data type here. This is actually working with the binary instead of pretending too with strings.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.