Пример #1
0
        internal void ReadGroups(PluginFile plugin)
        {
            var source    = plugin.source;
            var endOffset = source.fileSize - 1;

            while (source.stream.Position < endOffset)
            {
                GroupRecord.Read(plugin, source);
            }
            plugin.internalElements.TrimExcess();
            plugin.SortRecords();
        }
Пример #2
0
        internal void ReadChildren(GroupRecord group, PluginFileSource source)
        {
            var file = group.file;

            source.ReadMultiple(group.dataSize, () => {
                var sig = Signature.Read(source);
                source.stream.Position -= 4;
                if (sig == Signatures.GRUP)
                {
                    GroupRecord.Read(group, source);
                }
                else
                {
                    var rec = MainRecord.Read(group, source, sig);
                    file.IndexRecord(rec);
                }
            });
            group.internalElements.TrimExcess();
        }