code: @Override
      protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out)
              throws Exception {
          in.markReaderIndex();
          int preIndex = in.readerIndex();
          int length = readRawVarint32(in);
          if (preIndex == in.readerIndex()) {
              return;
          }
          if (length < 0) {
              throw new CorruptedFrameException("negative length: " + length);
          }
  
          if (in.readableBytes() < length) {
              in.resetReaderIndex();
          } else {
              out.add(in.readRetainedSlice(length));
          }
      }
docs: (just like LengthFieldBasedFrameDecoder)