Author Topic: TNet data compression  (Read 2102 times)

tate

  • Guest
TNet data compression
« on: May 11, 2013, 03:28:21 PM »
Hi, I am wondering if TNet does any sort of compression on data before sending it over the network? I am looking through the code but am not seeing anything about compression yet. I am setting up to send over 65000 ushorts over the network for server side level generation on the fly sent to the clients. I know if the data is gzipped it will be about 10 kb which is already pretty big but uncompressed it will be outrageously huge and i will need to go a different route.

Thanks in advance!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNet data compression
« Reply #1 on: May 12, 2013, 12:49:19 PM »
No, TNet doesn't compress anything. It wouldn't be a good idea for the library to assume that stuff should be compressed as it would slow everything down for no good reason. If you need to compress something, do it yourself, and instead of sending an array of ushorts, send a byte array representing the compressed result.

tate

  • Guest
Re: TNet data compression
« Reply #2 on: May 12, 2013, 02:35:27 PM »
Thanks Aren! I just got a gzipped byte array to work right before I saw your reply so it is good to know I didn't do that work for nothing.