public IndexArea(byte[] data, int startIndex) { indexHeader = new IndexHeader(data, startIndex); indexes = new Index[indexHeader.indexCount - 1]; for (int i = 0; i < indexes.Length; i++) { startIndex += 14; indexes[i] = new Index(data, startIndex); } }
public PacketData(WP6Document document, int prefixID) { _data = document.data; if (prefixID > -1) { index = document.indexArea.indexes[prefixID]; dataIndex = index.dataPacketPointer; if (index.flags.HasFlag(IndexFlags.childPacketIDs)) { childIDCount = BitConverter.ToInt16(_data, dataIndex); childID = new short[childIDCount]; dataIndex += 2; for (int i = 0; i < childIDCount; i++) { childID[i] = BitConverter.ToInt16(_data, dataIndex); dataIndex += 2; } } if (index.flags.HasFlag(IndexFlags.WP_character_set_mapped_text)) { numTextBlocks = BitConverter.ToInt16(_data, dataIndex); dataIndex += 2; if (numTextBlocks > 0) { firstBlockOffset = BitConverter.ToInt32(_data, dataIndex); dataIndex += 4; } sizeofBlock = new int[numTextBlocks]; for (int i = 0; i < sizeofBlock.Length; i++) { sizeofBlock[i] = BitConverter.ToInt32(_data, dataIndex); dataIndex += 4; } } } }