private static LinkedBuffer writeUTF8OneByteDelimited(final CharSequence str, final int index,
            final int len, final WriteSession session, LinkedBuffer lb)
    {
        final int lastSize = session.size;

        if (lb.offset == lb.buffer.length)
        {
            // create a new buffer.
            lb = new LinkedBuffer(len + 1 > session.nextBufferSize ? len + 1 : session.nextBufferSize,
                    lb);

            lb.offset = 1;

            // fast path
            final LinkedBuffer rb = writeUTF8(str, index, len, session, lb);

            lb.buffer[0] = (byte) (session.size - lastSize);

            // update size
            session.size++;

            return rb;
        }

        final int withIntOffset = lb.offset + 1;
        if (withIntOffset + len > lb.buffer.length)
        {
            // not enough space for the string.
            lb.offset = withIntOffset;

            final byte[] buffer = lb.buffer;

            // slow path
            final LinkedBuffer rb = writeUTF8(str, index, len, buffer, withIntOffset, buffer.length,
                    session, lb);

            buffer[withIntOffset - 1] = (byte) (session.size - lastSize);

            // update size
            session.size++;

            return rb;
        }

        // everything fits
        lb.offset = withIntOffset;

        final LinkedBuffer rb = writeUTF8(str, index, len, session, lb);

        lb.buffer[withIntOffset - 1] = (byte) (session.size - lastSize);

        // update size
        session.size++;

        return rb;
    }
The length of the utf8 bytes is written first before the string - which is fixed 2-bytes.
protostuff-api/src/main/java/io/protostuff/StringSerializer.java