io.netty.handler.codec.compression.Lz4FrameEncoder.class Maven / Gradle / Ivy
???? 2? 2io/netty/handler/codec/compression/Lz4FrameEncoder HLio/netty/handler/codec/MessageToByteEncoder; +io/netty/handler/codec/MessageToByteEncoder Lz4FrameEncoder.java 4io/netty/handler/codec/compression/Lz4FrameEncoder$3 4io/netty/handler/codec/compression/Lz4FrameEncoder$2 4io/netty/handler/codec/compression/Lz4FrameEncoder$1 ENCODE_FINSHED_EXCEPTION )Lio/netty/handler/codec/EncoderException; DEFAULT_MAX_ENCODE_SIZE I??? blockSize
compressor Lnet/jpountz/lz4/LZ4Compressor; checksum 4Lio/netty/handler/codec/compression/ByteBufChecksum; compressionLevel buffer Lio/netty/buffer/ByteBuf;
maxEncodeSize finished Z ctx (Lio/netty/channel/ChannelHandlerContext; ()V (Z)V !
" this 4Lio/netty/handler/codec/compression/Lz4FrameEncoder; net/jpountz/lz4/LZ4Factory & fastestInstance ()Lnet/jpountz/lz4/LZ4Factory; ( )
' * net/jpountz/xxhash/XXHashFactory - $()Lnet/jpountz/xxhash/XXHashFactory; ( /
. 0?G?? newStreamingHash32 )(I)Lnet/jpountz/xxhash/StreamingXXHash32; 3 4
. 5 $net/jpountz/xxhash/StreamingXXHash32 7
asChecksum ()Ljava/util/zip/Checksum; 9 :
8 ; 9(Lnet/jpountz/lz4/LZ4Factory;ZILjava/util/zip/Checksum;)V =
> highCompressor :(Lnet/jpountz/lz4/LZ4Factory;ZILjava/util/zip/Checksum;I)V A
B factory Lnet/jpountz/lz4/LZ4Factory; Ljava/util/zip/Checksum;
G java/lang/NullPointerException I D (Ljava/lang/String;)V L
J M java/util/zip/Checksum O !()Lnet/jpountz/lz4/LZ4Compressor; @ R
' S fastCompressor U R
' V net/jpountz/lz4/LZ4Compressor X Z 2io/netty/handler/codec/compression/ByteBufChecksum \ wrapChecksum N(Ljava/util/zip/Checksum;)Lio/netty/handler/codec/compression/ByteBufChecksum; ^ _
] ` b (I)I d
e g i !io/netty/util/internal/ObjectUtil l
checkPositive (ILjava/lang/String;)I n o
m p r t "java/lang/IllegalArgumentException w blockSize: %d (expected: %d-%d) y java/lang/Object { java/lang/Integer } valueOf (I)Ljava/lang/Integer; ?
~ ? java/lang/String ? format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; ? ?
? ?
x M numberOfLeadingZeros ? d
~ ? java/lang/Math ? max (II)I ? ?
? ? allocateBuffer ](Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Z)Lio/netty/buffer/ByteBuf; ^(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;ZZ)Lio/netty/buffer/ByteBuf; ? ?
? msg preferDirect io/netty/buffer/ByteBuf ?
readableBytes ()I ? ?
? ? ? 'io/netty/handler/codec/EncoderException ? 2too much data to allocate a buffer for compression ?
? M min ? ?
? ? maxCompressedLength ? d
Y ? Urequested encode buffer size (%d bytes) exceeds the maximum allowable size (%d bytes) ? io/netty/buffer/Unpooled ? EMPTY_BUFFER ? ? ? &io/netty/channel/ChannelHandlerContext ? alloc $()Lio/netty/buffer/ByteBufAllocator; ? ? ? ? io/netty/buffer/ByteBufAllocator ? ioBuffer (II)Lio/netty/buffer/ByteBuf; ? ? ? ?
heapBuffer ? ? ? ? curSize allowEmptyReturn
targetBufSize remaining encode ](Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Lio/netty/buffer/ByteBuf;)V java/lang/Exception ?
isWritable (I)Z ? ?
? ?
?
writeBytes 4(Lio/netty/buffer/ByteBuf;)Lio/netty/buffer/ByteBuf; ? ?
? ?
writableBytes ? ?
? ? readBytes 5(Lio/netty/buffer/ByteBuf;I)Lio/netty/buffer/ByteBuf; ? ?
? ? ()Z ? ?
? ? flushBufferedData (Lio/netty/buffer/ByteBuf;)V ? ?
?
nextChunkSize in out length net/jpountz/lz4/LZ4Exception ? reset ?
] ? readerIndex ? ?
? ? update (Lio/netty/buffer/ByteBuf;II)V ? ?
] ? getValue ()J ? ?
] ? ensureWritable (I)Lio/netty/buffer/ByteBuf; ? ?
? ? writerIndex ? ?
? ? internalNioBuffer (II)Ljava/nio/ByteBuffer; ? ?
? java/nio/ByteBuffer position ?
compress -(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V
Y 7io/netty/handler/codec/compression/CompressionException (Ljava/lang/Throwable;)V
setBytes 7(ILio/netty/buffer/ByteBuf;II)Lio/netty/buffer/ByteBuf;
?LZ4Block setLong (IJ)Lio/netty/buffer/ByteBuf;
? setByte ?
? setIntLE ?
? ? ?
? clear ()Lio/netty/buffer/ByteBuf;"#
?$ outNioBuffer Ljava/nio/ByteBuffer; pos compressedLength e Lnet/jpountz/lz4/LZ4Exception; blockType flushableBytes check bufSize idx flush +(Lio/netty/channel/ChannelHandlerContext;)V
isReadable3 ?
?4 isPreferDirect6 ?
7 write 4(Ljava/lang/Object;)Lio/netty/channel/ChannelFuture;9: ?; *()Lio/netty/channel/ChannelHandlerContext;1= ?> buf finishEncode k(Lio/netty/channel/ChannelHandlerContext;Lio/netty/channel/ChannelPromise;)Lio/netty/channel/ChannelFuture; io/netty/channel/ChannelPromiseC
setSuccess #()Lio/netty/channel/ChannelPromise;EFDG ? ? ?I setIntK ?
?L
writeAndFlush U(Ljava/lang/Object;Lio/netty/channel/ChannelPromise;)Lio/netty/channel/ChannelFuture;NO ?P promise !Lio/netty/channel/ChannelPromise; footer isClosed close "()Lio/netty/channel/ChannelFuture; =
X
newPromiseZF ?[ C(Lio/netty/channel/ChannelPromise;)Lio/netty/channel/ChannelFuture;V]
^ executor *()Lio/netty/util/concurrent/EventExecutor;`a ?b &io/netty/util/concurrent/EventExecutord inEventLoopf ?egAB
i X(Lio/netty/handler/codec/compression/Lz4FrameEncoder;Lio/netty/channel/ChannelPromise;)V k
l execute (Ljava/lang/Runnable;)Vnoep (Lio/netty/util/concurrent/EventExecutor; L(Lio/netty/channel/ChannelHandlerContext;Lio/netty/channel/ChannelPromise;)V ?(Lio/netty/handler/codec/compression/Lz4FrameEncoder;Lio/netty/channel/ChannelHandlerContext;Lio/netty/channel/ChannelPromise;)V t
u io/netty/channel/ChannelFuturew addListener R(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture;yzx{ isDone} ?x~
u
java/util/concurrent/TimeUnit? SECONDS Ljava/util/concurrent/TimeUnit;?? ?? schedule `(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Lio/netty/util/concurrent/ScheduledFuture;??e? f Lio/netty/channel/ChannelFuture; ? java/lang/IllegalStateException? not added to a pipeline?
? M handlerAdded
wrappedBuffer ([B)Lio/netty/buffer/ByteBuf;??
?? handlerRemoved?2
? release? ?
?? getBackingBuffer V(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;Lio/netty/buffer/ByteBuf;)V ? ?
? V(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;Z)Lio/netty/buffer/ByteBuf; ? ?
?
access$000 ^(Lio/netty/handler/codec/compression/Lz4FrameEncoder;)Lio/netty/channel/ChannelHandlerContext; x0
access$100 ?(Lio/netty/handler/codec/compression/Lz4FrameEncoder;Lio/netty/channel/ChannelHandlerContext;Lio/netty/channel/ChannelPromise;)Lio/netty/channel/ChannelFuture; x1 x2