Esempio n. 1
0
        public static Dictionary <int, List <string> > ReadTextRecords(BinaryReader reader)
        {
            Dictionary <int, List <string> > records = new Dictionary <int, List <string> >();
            QrcHeader header = ReadHeader(reader);

            foreach (KeyValuePair <int, uint> offsets in header.TextRecordOffsets)
            {
                records[offsets.Key] = ReadTextRecord(reader, offsets.Value);
            }

            return(records);
        }
Esempio n. 2
0
        private static QrcHeader ReadHeader(BinaryReader reader)
        {
            QrcHeader header = new QrcHeader();

            header.TextRecordHeaderLength = reader.ReadUInt16();
            int textRecordCount = (header.TextRecordHeaderLength / 6) - 1;

            header.TextRecordOffsets = new Dictionary <int, uint>();
            for (int i = 0; i < textRecordCount; i++)
            {
                ushort textRecordId = reader.ReadUInt16();
                header.TextRecordOffsets[textRecordId] = reader.ReadUInt32();
            }

            return(header);
        }