[ENet-discuss] Compression algorithm

Yaser Zhian y at yaserzt.com
Tue Mar 30 01:42:39 PDT 2010


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.cubik.org/pipermail/enet-discuss/attachments/20100330/c04dd42b/attachment.pgp>


More information about the ENet-discuss mailing list