private CodedInputStream createCis(ByteBuff buf) {
    // Here we read in the header. We avoid having pb
    // do its default 4k allocation for CodedInputStream. We force it to use
    // backing array.
    CodedInputStream cis;
    if (buf.hasArray()) {
      cis = UnsafeByteOperations
        .unsafeWrap(buf.array(), buf.arrayOffset() + buf.position(), buf.limit()).newCodedInput();
    } else {
      cis = UnsafeByteOperations.unsafeWrap(new ByteBuffByteInput(buf, buf.limit()), 0, buf.limit())
        .newCodedInput();
    }
    cis.enableAliasing(true);
    return cis;
  }
No protobuf encoding of raw sasl messages
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/ServerRpcConnection.java