@Test public void testCompressInputForProtobuf() throws IOException { Echo.EchoRequest request = Echo.EchoRequest.newBuilder().setMessage("hello").build(); ByteBuf byteBuf = compress.compressInput(request, protobufRpcMethodInfo); System.out.println(byteBuf.readableBytes()); }
@Override public ByteBuf compressInput(Object proto, RpcMethodInfo rpcMethodInfo) throws IOException { byte[] bytes = rpcMethodInfo.inputEncode(proto); return Unpooled.wrappedBuffer(bytes); }
NoneCompress implements Compress { @Override public ByteBuf compressInput(Object proto, RpcMethodInfo rpcMethodInfo) throws IOException { byte[] bytes = rpcMethodInfo.inputEncode(proto); return Unpooled.wrappedBuffer(bytes); } }
NoneCompress implements Compress { @Override public ByteBuf compressInput(Object proto, RpcMethodInfo rpcMethodInfo) throws IOException { byte[] bytes = rpcMethodInfo.inputEncode(proto); return Unpooled.wrappedBuffer(bytes); }  }
NoneCompress implements Compress { @Override public ByteBuf compressInput(Object proto, RpcMethodInfo rpcMethodInfo) throws IOException { byte[] bytes = rpcMethodInfo.inputEncode(proto); return Unpooled.wrappedBuffer(bytes); }  @Override ByteBuf compressInput(Object proto, RpcMethodInfo rpcMethodInfo); @Override Object uncompressOutput(ByteBuf byteBuf, RpcMethodInfo rpcMethodInfo); @Override Object uncompressOutput(byte[] bytes, RpcMethodInfo rpcMethodInfo); @Override Object uncompressOutput(DynamicCompositeByteBuf byteBuf, RpcMethodInfo rpcMethodInfo); @Override ByteBuf compressOutput(Object proto, RpcMethodInfo rpcMethodInfo); @Override Object uncompressInput(ByteBuf byteBuf, RpcMethodInfo rpcMethodInfo); @Override Object uncompressInput(byte[] bytes, RpcMethodInfo rpcMethodInfo); @Override Object uncompressInput(DynamicCompositeByteBuf byteBuf, RpcMethodInfo rpcMethodInfo); }
NoneCompress implements Compress { @Override public ByteBuf compressInput(Object proto, RpcMethodInfo rpcMethodInfo) throws IOException { byte[] bytes = rpcMethodInfo.inputEncode(proto); return Unpooled.wrappedBuffer(bytes); }  @Override ByteBuf compressInput(Object proto, RpcMethodInfo rpcMethodInfo); @Override Object uncompressOutput(ByteBuf byteBuf, RpcMethodInfo rpcMethodInfo); @Override Object uncompressOutput(byte[] bytes, RpcMethodInfo rpcMethodInfo); @Override Object uncompressOutput(DynamicCompositeByteBuf byteBuf, RpcMethodInfo rpcMethodInfo); @Override ByteBuf compressOutput(Object proto, RpcMethodInfo rpcMethodInfo); @Override Object uncompressInput(ByteBuf byteBuf, RpcMethodInfo rpcMethodInfo); @Override Object uncompressInput(byte[] bytes, RpcMethodInfo rpcMethodInfo); @Override Object uncompressInput(DynamicCompositeByteBuf byteBuf, RpcMethodInfo rpcMethodInfo);  }