static byte[] getTagBytes(int tag)
    {
        int tagSize = CodedOutput.computeRawVarint32Size(tag);
        if (tagSize == 1)
            return new byte[] { (byte) tag };

        byte[] buffer = new byte[tagSize];
        int offset = 0;
        for (int i = 0, last = tagSize - 1; i < last; i++, tag >>>= 7)
            buffer[offset++] = (byte) ((tag & 0x7F) | 0x80);

        buffer[offset++] = (byte) tag;
        return buffer;
    }
Write the nested message encoded as group.
protostuff-core/src/test/java/io/protostuff/DeferredOutput.java