public static ByteString concatenate(final ByteString left, final ByteString right) {
        return RopeByteString.concatenate(left, right);
    }
Concatenate the given strings while performing various optimizations to
slow the growth rate of tree depth and tree node count. The result is
either a {@link com.google.protobuf.ByteString.LeafByteString} or a
{@link RopeByteString} depending on which optimizations, if any, were
applied.

<p>Small pieces of length less than {@link
ByteString#CONCATENATE_BY_COPY_SIZE} may be copied by value here, as in
BAP95.  Large pieces are referenced without copy.

<p>Most of the operation here is inspired by the now-famous paper <a
 * href="https://web.archive.org/web/20060202015456/http://www.cs.ubc.ca/local/reading/proceedings/spe91-95/spe/vol25/issue12/spe986.pdf">

@param left  string on the left
@param right string on the right
@return concatenation representing the same sequence as the given strings
jraft-core/src/main/java/com/google/protobuf/ZeroByteStringHelper.java