@Test public void gzip() throws Exception { byte[] data = "foo".getBytes(StandardCharsets.UTF_8); byte[] compressed = obs(data) .compose(ByteBufs.gzip()) .compose(ByteBufs.aggrByteArray()) .toBlocking().first(); Assert.assertArrayEquals(data, gzipDecompress(compressed)); }
public static Observable.Transformer<ByteBuf, ByteBuf> gzip() { return input -> encode(input, new EmbeddedChannel(new JdkZlibEncoder(ZlibWrapper.GZIP))); }
ByteBufs { public static Observable.Transformer<ByteBuf, ByteBuf> gzip() { return input -> encode(input, new EmbeddedChannel(new JdkZlibEncoder(ZlibWrapper.GZIP))); } }
ByteBufs { public static Observable.Transformer<ByteBuf, ByteBuf> gzip() { return input -> encode(input, new EmbeddedChannel(new JdkZlibEncoder(ZlibWrapper.GZIP))); } private  ByteBufs(); }
ByteBufs { public static Observable.Transformer<ByteBuf, ByteBuf> gzip() { return input -> encode(input, new EmbeddedChannel(new JdkZlibEncoder(ZlibWrapper.GZIP))); } private  ByteBufs(); static Observable.Transformer<ByteBuf, ByteBuf> gzip(); static Observable.Transformer<ByteBuf, ByteBuf> gunzip(); static Observable.Transformer<ByteBuf, ByteBuf> json(); static Observable.Transformer<ByteBuf, ByteBuf> json(int maxLength); static Observable<ByteBuf> autoReleaseCopy(Observable<ByteBuf> stream); static Observable.Transformer<ByteBuf, ByteBuf> lines(int maxLength); static Observable.Transformer<ByteBuf, ServerSentEvent> sse(int maxLength); static Func1<ByteBuf, byte[]> toByteArray(); static Observable.Transformer<ByteBuf, byte[]> aggrByteArray(); static Observable.Transformer<ByteBuf, String> toString(String enc); }
ByteBufs { public static Observable.Transformer<ByteBuf, ByteBuf> gzip() { return input -> encode(input, new EmbeddedChannel(new JdkZlibEncoder(ZlibWrapper.GZIP))); } private  ByteBufs(); static Observable.Transformer<ByteBuf, ByteBuf> gzip(); static Observable.Transformer<ByteBuf, ByteBuf> gunzip(); static Observable.Transformer<ByteBuf, ByteBuf> json(); static Observable.Transformer<ByteBuf, ByteBuf> json(int maxLength); static Observable<ByteBuf> autoReleaseCopy(Observable<ByteBuf> stream); static Observable.Transformer<ByteBuf, ByteBuf> lines(int maxLength); static Observable.Transformer<ByteBuf, ServerSentEvent> sse(int maxLength); static Func1<ByteBuf, byte[]> toByteArray(); static Observable.Transformer<ByteBuf, byte[]> aggrByteArray(); static Observable.Transformer<ByteBuf, String> toString(String enc);  }