I serialize the data for every player server side and it’s about 128kb in size. I serialize a [255,255] array of bools which is a must for mapping, what alternatives could I use as I heard gzip would actually increase the size?
I have heard about protobuf-net but it’s undocumented and no examples exist on the internet.
If you represent the booleans as bits and serialise as binary, that is only about 8 kilobyte.
If you need is as text, serialise the binary using base64, that will make it about 12 kilobyte.
Flatten the two dimensional array to a one dimensional array, and make a
BitArrayfrom it.Example:
Outut: