my app serialize objects in Kryo and record it in DB. And my app will communicate with Kryonet. I tried to compress it with Snappy after serializing with Kryo. However, the test code means Kryo does not need compression. Does Kryo compresss internally? Is Kryonet the same? is it faster than Snappy?
User u = getRandomUser();
//2216 bytes
System.out.println("object size:" + ObjectSizeCalculator.getObjectSize(u));
byte[] serialized = serializeByKryo(u);
//1708 bytes
System.out.println("serialized size:" + serialized.length);
byte[] compressed = Snappy.compress(serialized);
//1713 bytes
System.out.println("compressed size:" + compressed.length);