On 3/24/2010 17:50, Peter Soxberger wrote: > I'm currently thinking of what compression algorithm would be best to > implement into a ENet based game? > Compression algorithms like ZIP would couse to much overhead. Algorithms like > ZIP are designed for compressing huge files and not small network packets. > What algorithm can be used for this? > What are you guys using in your projects? >
I agree that you should do data-specific compression first, and then maybe use a general compressor to further compress the result before transmission. Of course Zlib is the most widely used compression library out there, but if speed is important to you, you can take a look at UCL and LZO. http://www.oberhumer.com/opensource/ucl/ http://www.oberhumer.com/opensource/lzo/ These are two libraries designed by the guys who make UPX. Overall, I would say that the compression ratio and speed of UCL is great (I feel it has a better compression than zlib, and it is quite faster, but I've never done a real benchmark.) The other algorithm, LZO is a bit faster but makes a bit larger data. Both libraries are under GPL though. I don't know whether that is good or bad for you. -yzt -- May the Source be with you.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
