/// <summary> /// Read each entry in the Entry Stream /// </summary> /// <returns></returns> private List<EntryStreamData> ReadEntryStream() { List<EntryStreamData> entries = new List<EntryStreamData>(); CFStream entryStream = _compoundFile.RootStorage.GetStorage(STORAGE_NAME).GetStream(EntryStreamData.STREAM_NAME); byte[] data = entryStream.GetData(); int numberOfEntries = data.Length / 8; for (int i = 0; i < numberOfEntries; i++) { EntryStreamData es = new EntryStreamData(); es.NameIdentifier = BitConverter.ToInt32(data, i * 8); es.GUIDIndex = BitConverter.ToInt16(data, (i * 8) + 4); es.PropertyIndex = BitConverter.ToInt16(data, (i * 8) + 6); es.IsString = es.GUIDIndex % 2 == 1; //is a string es.GUIDIndex = (short)(es.GUIDIndex >> 1); //cut off the last bit entries.Add(es); } return entries; }
/// <summary> /// Read each entry in the Entry Stream /// </summary> /// <returns></returns> private List <EntryStreamData> ReadEntryStream() { List <EntryStreamData> entries = new List <EntryStreamData>(); CFStream entryStream = _compoundFile.RootStorage.GetStorage(STORAGE_NAME).GetStream(EntryStreamData.STREAM_NAME); byte[] data = entryStream.GetData(); int numberOfEntries = data.Length / 8; for (int i = 0; i < numberOfEntries; i++) { EntryStreamData es = new EntryStreamData(); es.NameIdentifier = BitConverter.ToInt32(data, i * 8); es.GUIDIndex = BitConverter.ToInt16(data, (i * 8) + 4); es.PropertyIndex = BitConverter.ToInt16(data, (i * 8) + 6); es.IsString = es.GUIDIndex % 2 == 1; //is a string es.GUIDIndex = (short)(es.GUIDIndex >> 1); //cut off the last bit entries.Add(es); } return(entries); }