DotNetty.Codecs http://www.faqs.org/rfcs/rfc3548.html Table 1: The Base 64 Alphabet http://www.faqs.org/rfcs/rfc3548.html Table 2: The "URL and Filename safe" Base 64 Alphabet Cumulates instances of by merging them into one , using memory copies. Cumulate instances of by add them to a and therefore avoiding memory copy when possible. Be aware that use a more complex indexing implementation so depending on your use-case and the decoder implementation this may be slower then just use the . Determines whether only one message should be decoded per call. Default is false as this has performance impacts. Is particularly useful in support of protocol upgrade scenarios. Returns the actual number of readable bytes in the internal cumulative buffer of this decoder. You usually do not need to rely on this value to write a decoder. Use it only when you must use it at your own risk. This method is a shortcut to of . An which is thrown by a codec. https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/Adler32.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/CRC32.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/Deflate.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/Deflater.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/GZIPException.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/GZIPHeader.java http://www.ietf.org/rfc/rfc1952.txt https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/InfBlocks.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/InfCodes.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/Inflate.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/Inflater.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/InfTree.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/JZlib.java Creates a new zlib encoder with the specified {@code compressionLevel}, the specified {@code windowBits}, the specified {@code memLevel}, and the specified wrapper. @param compressionLevel {@code 1} yields the fastest compression and {@code 9} yields the best compression. {@code 0} means no compression. The default compression level is {@code 6}. @param windowBits The base two logarithm of the size of the history buffer. The value should be in the range {@code 9} to {@code 15} inclusive. Larger values result in better compression at the expense of memory usage. The default value is {@code 15}. @param memLevel How much memory should be allocated for the internal compression state. {@code 1} uses minimum memory and {@code 9} uses maximum memory. Larger values result in better and faster compression at the expense of memory usage. The default value is {@code 8} @throws CompressionException if failed to initialize zlib https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/StaticTree.java https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/Tree.java Close this {@link ZlibEncoder} and so finish the encoding. The returned {@link ChannelFuture} will be notified once the operation completes. The container file formats that wrap the stream compressed by the DEFLATE algorithm. The ZLIB wrapper as specified in RFC 1950. The GZIP wrapper as specified in RFC 1952. Raw DEFLATE stream only (no header and no footer). Try {@link #ZLIB} first and then {@link #NONE} if the first attempt fails. Please note that you can specify this wrapper type only when decompressing. https://github.com/ymnk/jzlib/blob/master/src/main/java/com/jcraft/jzlib/ZStream.java Those methods are expected to be override by Inflater and Deflater. In the future, they will become abstract methods. A which is thrown when the received frame data could not be decoded by an inbound handler. A decoder that splits the received by one or more delimiters.It is particularly useful for decoding the frames which ends with a delimiter such as or

Specifying more than one delimiter

allows you to specify more than one delimiter. If more than one delimiter is found in the buffer, it chooses the delimiter which produces the shortest frame. For example, if you have the following data in the buffer: +--------------+ | ABC\nDEF\r\n | +--------------+ a will choose '\n' as the first delimiter and produce two frames: +-----+-----+ | ABC | DEF | +-----+-----+ rather than incorrectly choosing '\r\n' as the first delimiter: +----------+ | ABC\nDEF | +----------+
Common constructor The maximum length of the decoded frame NOTE: A see is thrown if the length of the frame exceeds this value. whether the decoded frame should strip out the delimiter or not If true, a is thrown as soon as the decoder notices the length of the frame will exceedmaxFrameLength regardless of whether the entire frame has been read. If false, a is thrown after the entire frame that exceeds maxFrameLength has been read. delimiters Returns true if the delimiters are "\n" and "\r\n" ReturnsReturn true if the current instance is a subclass of DelimiterBasedFrameDecoder Create a frame out of the and return it the which this belongs to the from which to read data the which represent the frame or null if no frame could be created. Returns the number of bytes between the readerIndex of the haystack and the first needle found in the haystack. -1 is returned if no needle is found in the haystack. Returns a null (0x00) delimiter, which could be used for Flash XML socket or any similar protocols Returns {@code CR ('\r')} and {@code LF ('\n')} delimiters, which could be used for text-based line protocols. Splits a byte stream of JSON objects and arrays into individual objects/arrays and passes them up the . This class does not do any real parsing or validation. A sequence of bytes is considered a JSON object/array if it contains a matching number of opening and closing braces/brackets. It's up to a subsequent to parse the JSON text into a more usable form i.e.a POCO. Create a new instance. The maximum length of the frame. If the length of the frame is greater than this value then will be thrown. The offset of the length field. The length of the length field. Create a new instance. The maximum length of the frame. If the length of the frame is greater than this value then will be thrown. The offset of the length field. The length of the length field. The compensation value to add to the value of the length field. the number of first bytes to strip out from the decoded frame. Create a new instance. The maximum length of the frame. If the length of the frame is greater than this value then will be thrown. The offset of the length field. The length of the length field. The compensation value to add to the value of the length field. the number of first bytes to strip out from the decoded frame. If true, a is thrown as soon as the decoder notices the length of the frame will exceeed regardless of whether the entire frame has been read. If false, a is thrown after the entire frame that exceeds has been read. Defaults to true in other overloads. Create a new instance. The of the lenght field. The maximum length of the frame. If the length of the frame is greater than this value then will be thrown. The offset of the length field. The length of the length field. The compensation value to add to the value of the length field. the number of first bytes to strip out from the decoded frame. If true, a is thrown as soon as the decoder notices the length of the frame will exceeed regardless of whether the entire frame has been read. If false, a is thrown after the entire frame that exceeds has been read. Defaults to true in other overloads. Create a frame out of the and return it. The which this belongs to. The from which to read data. The which represents the frame or null if no frame could be created. Decodes the specified region of the buffer into an unadjusted frame length. The default implementation is capable of decoding the specified region into an unsigned 8/16/24/32/64 bit integer. Override this method to decode the length field encoded differently. Note that this method must not modify the state of the specified buffer (e.g. , , and the content of the buffer.) The buffer we'll be extracting the frame length from. The offset from the absolute . The length of the framelenght field. Expected: 1, 2, 3, 4, or 8. The preferred of buffer. A long integer that represents the unadjusted length of the next frame. An encoder that prepends the length of the message. The length value is prepended as a binary form.

For example, {@link LengthFieldPrepender}(2) will encode the following 12-bytes string:

                    +----------------+
                    | "HELLO, WORLD" |
                    +----------------+
                
into the following:
                    +--------+----------------+
                    + 0x000C | "HELLO, WORLD" |
                    +--------+----------------+
                
If you turned on the {@code lengthIncludesLengthFieldLength} flag in the constructor, the encoded data would look like the following (12 (original data) + 2 (prepended data) = 14 (0xE)):
                    +--------+----------------+
                    + 0x000E | "HELLO, WORLD" |
                    +--------+----------------+
                
Creates a new instance. The length of the prepended length field. Only 1, 2, 3, 4, and 8 are allowed. Creates a new instance. The length of the prepended length field. Only 1, 2, 3, 4, and 8 are allowed. If true, the length of the prepended length field is added to the value of the prepended length field. Creates a new instance. The length of the prepended length field. Only 1, 2, 3, 4, and 8 are allowed. The compensation value to add to the value of the length field. Creates a new instance. The length of the prepended length field. Only 1, 2, 3, 4, and 8 are allowed. If true, the length of the prepended length field is added to the value of the prepended length field. The compensation value to add to the value of the length field. Creates a new instance. The of the length field. The length of the prepended length field. Only 1, 2, 3, 4, and 8 are allowed. If true, the length of the prepended length field is added to the value of the prepended length field. The compensation value to add to the value of the length field. A decoder that splits the received {@link ByteBuf}s on line endings. Both {@code "\n"} and {@code "\r\n"} are handled. For a more general delimiter-based decoder, see {@link DelimiterBasedFrameDecoder}. Maximum length of a frame we're willing to decode. Whether or not to throw an exception as soon as we exceed maxLength. True if we're discarding input because we're already over maxLength. Initializes a new instance of the class. the maximum length of the decoded frame. A {@link TooLongFrameException} is thrown if the length of the frame exceeds this value. Initializes a new instance of the class. the maximum length of the decoded frame. A {@link TooLongFrameException} is thrown if the length of the frame exceeds this value. whether the decoded frame should strip out the delimiter or not If true, a {@link TooLongFrameException} is thrown as soon as the decoder notices the length of the frame will exceed maxFrameLength regardless of whether the entire frame has been read. If false, a {@link TooLongFrameException} is thrown after the entire frame that exceeds maxFrameLength has been read. Create a frame out of the {@link ByteBuf} and return it. the {@link ChannelHandlerContext} which this {@link ByteToMessageDecoder} belongs to the {@link ByteBuf} from which to read data An abstract that aggregates a series of message objects into a single aggregated message. 'A series of messages' is composed of the following: a single start message which optionally contains the first part of the content, and 1 or more content messages. The content of the aggregated message will be the merged content of the start message and its following content messages. If this aggregator encounters a content message where { @link #isLastContentMessage(ByteBufHolder)} return true for, the aggregator will finish the aggregation and produce the aggregated message and expect another start message. The type that covers both start message and content message The type of the start message The type of the content message The type of the aggregated message Message to message decoder. Decode from one message to an other. This method will be called for each written message that can be handled by this encoder. the {@link ChannelHandlerContext} which this {@link MessageToMessageDecoder} belongs to the message to decode to an other one the {@link List} to which decoded messages should be added Returns {@code true} if the given message should be handled. If {@code false} it will be passed to the next {@link ChannelHandler} in the {@link ChannelPipeline}. Encode from one message to an other. This method will be called for each written message that can be handled by this encoder. @param context the {@link ChannelHandlerContext} which this {@link MessageToMessageEncoder} belongs to @param message the message to encode to an other one @param output the {@link List} into which the encoded message should be added needs to do some kind of aggragation @throws Exception is thrown if an error accour A decoder that splits the received {@link ByteBuf}s dynamically by the value of the Google Protocol Buffers http://code.google.com/apis/protocolbuffers/docs/encoding.html#varints Base 128 Varints integer length field in the message. For example: BEFORE DECODE (302 bytes) AFTER DECODE (300 bytes) +--------+---------------+ +---------------+ | Length | Protobuf Data |----->| Protobuf Data | | 0xAC02 | (300 bytes) | | (300 bytes) | +--------+---------------+ +---------------+ An encoder that prepends the the Google Protocol Buffers http://code.google.com/apis/protocolbuffers/docs/encoding.html#varints Base 128 Varints integer length field. For example: BEFORE ENCODE (300 bytes) AFTER ENCODE (302 bytes) +---------------+ +--------+---------------+ | Protobuf Data |-------------->| Length | Protobuf Data | | (300 bytes) | | 0xAC02 | (300 bytes) | +---------------+ +--------+---------------+ Initializes a new instance of the class with the current system character set. Initializes a new instance of the class with the specified character set.. Encoding. Encodes the requested {@link String} into a {@link ByteBuf}. A typical setup for a text-based line protocol in a TCP/IP socket would be:
             {@link ChannelPipeline} pipeline = ...;
            
             // Decoders
             pipeline.addLast("frameDecoder", new {@link LineBasedFrameDecoder}(80));
             pipeline.addLast("stringDecoder", new {@link StringDecoder}(CharsetUtil.UTF_8));
            
             // Encoder
             pipeline.addLast("stringEncoder", new {@link StringEncoder}(CharsetUtil.UTF_8));
             
and then you can use a {@link String} instead of a {@link ByteBuf} as a message:
             void channelRead({@link ChannelHandlerContext} ctx, {@link String} msg) {
                 ch.write("Did you say '" + msg + "'?\n");
             }
             
Initializes a new instance of the class with the current system character set. Initializes a new instance of the class with the specified character set.. Encoding. A which is thrown when the length of the frame decoded is greater than the allowed maximum. Thrown if an unsupported message is received by an codec.