private static final int[] getUtf8(byte[] array, int offset) {
        int val = array[offset];
        int length;
        if ((val & 0x80) != 0) {
            offset += 2;
        } else {
            offset += 1;
        }
        val = array[offset];
        if ((val & 0x80) != 0) {
            offset += 2;
        } else {
            offset += 1;
        }
        length = 0;
        while (array[offset + length] != 0) {
            length++;
        }
        return new int[]{offset, length};
    }
Returns number of strings in block.
xpatch/src/main/java/wind/android/content/res/StringBlock.java