code: static int decodeLiteral(byte tag, ByteBuf in, ByteBuf out) {
          in.markReaderIndex();
          int length;
          switch(tag >> 2 & 0x3F) {
          case 60:
              if (!in.isReadable()) {
                  return NOT_ENOUGH_INPUT;
              }
              length = in.readUnsignedByte();
              break;
          case 61:
              if (in.readableBytes() < 2) {
                  return NOT_ENOUGH_INPUT;
              }
              length = in.readUnsignedShortLE();
              break;
          case 62:
              if (in.readableBytes() < 3) {
                  return NOT_ENOUGH_INPUT;
              }
              length = in.readUnsignedMediumLE();
              break;
          case 63:
              if (in.readableBytes() < 4) {
                  return NOT_ENOUGH_INPUT;
              }
              length = in.readIntLE();
              break;
          default:
              length = tag >> 2 & 0x3F;
          }
          length += 1;
  
          if (in.readableBytes() < length) {
              in.resetReaderIndex();
              return NOT_ENOUGH_INPUT;
          }
  
          out.writeBytes(in, length);
          return length;
      }
docs: Reads a literal from the input buffer directly to the output buffer.
  A "literal" is an uncompressed segment of data stored directly in the
  byte stream.
  
  @param tag The tag that identified this segment as a literal is also
  used to encode part of the length of the data
  @param in The input buffer to read the literal from
  @param out The output buffer to write the literal to
  @return The number of bytes appended to the output buffer, or -1 to indicate "try again later"