<commit_before>// Copyright (c) <NAME>.
// Licensed under the Apache License, Version 2.0.

namespace SixLabors.Fonts.Tables.AdvancedTypographic.GPos
{
    internal readonly struct BaseRecord
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseRecord"/> struct.
        /// </summary>
        /// <param name="reader">The big endian binary reader.</param>
        /// <param name="classCount">The class count.</param>
        /// <param name="offset">Offset to the from beginning of BaseArray table.</param>
        public BaseRecord(BigEndianBinaryReader reader, ushort classCount, long offset)
        {
            // +--------------+-----------------------------------+----------------------------------------------------------------------------------------+
            // | Type         | Name                              | Description                                                                            |
            // +==============+===================================+========================================================================================+
            // | Offset16     | baseAnchorOffsets[markClassCount] | Array of offsets (one per mark class) to Anchor tables.                                |
            // |              |                                   | Offsets are from beginning of BaseArray table, ordered by class (offsets may be NULL). |
            // +--------------+-----------------------------------+----------------------------------------------------------------------------------------+
            this.BaseAnchorTables = new AnchorTable[classCount];
            for (int i = 0; i < classCount; i++)
            {
                ushort baseAnchorOffset = reader.ReadOffset16();

                // Restore stream offset, after reading anchor table.
                long readerPosition = reader.BaseStream.Position;
                this.BaseAnchorTables[i] = AnchorTable.Load(reader, offset + baseAnchorOffset);
                reader.BaseStream.Position = readerPosition;
            }
        }

        /// <summary>
        /// Gets the base anchor tables.
        /// </summary>
        public AnchorTable[] BaseAnchorTables { get; }
    }
}<commit_msg>Fix BaseRecord load<commit_after>// Copyright (c) <NAME>.
// Licensed under the Apache License, Version 2.0.

namespace SixLabors.Fonts.Tables.AdvancedTypographic.GPos
{
    internal readonly struct BaseRecord
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseRecord"/> struct.
        /// </summary>
        /// <param name="reader">The big endian binary reader.</param>
        /// <param name="classCount">The class count.</param>
        /// <param name="offset">Offset to the from beginning of BaseArray table.</param>
        public BaseRecord(BigEndianBinaryReader reader, ushort classCount, long offset)
        {
            // +--------------+-----------------------------------+----------------------------------------------------------------------------------------+
            // | Type         | Name                              | Description                                                                            |
            // +==============+===================================+========================================================================================+
            // | Offset16     | baseAnchorOffsets[markClassCount] | Array of offsets (one per mark class) to Anchor tables.                                |
            // |              |                                   | Offsets are from beginning of BaseArray table, ordered by class (offsets may be NULL). |
            // +--------------+-----------------------------------+----------------------------------------------------------------------------------------+
            this.BaseAnchorTables = new AnchorTable[classCount];
            for (int i = 0; i < classCount; i++)
            {
                ushort baseAnchorOffset = reader.ReadOffset16();
                this.BaseAnchorTables[i] = AnchorTable.Load(reader, offset + baseAnchorOffset);
            }
        }

        /// <summary>
        /// Gets the base anchor tables.
        /// </summary>
        public AnchorTable[] BaseAnchorTables { get; }
    }
}
{'fraction_non_alphanumeric': 0.27672373900971775, 'fraction_numerical': 0.003239241092086997, 'mean_word_length': 1.1636636636636637, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2014786', 'n_tokens_mistral': 878, 'n_tokens_neox': 828, 'n_words': 236}