SevenZipArchiveEntry.cs 678 B

12345678910111213141516171819202122232425262728
  1. using System.IO;
  2. using SharpCompress.Common.SevenZip;
  3. namespace SharpCompress.Archives.SevenZip
  4. {
  5. public class SevenZipArchiveEntry : SevenZipEntry, IArchiveEntry
  6. {
  7. internal SevenZipArchiveEntry(SevenZipArchive archive, SevenZipFilePart part)
  8. : base(part)
  9. {
  10. Archive = archive;
  11. }
  12. public Stream OpenEntryStream()
  13. {
  14. return FilePart.GetCompressedStream();
  15. }
  16. public IArchive Archive { get; }
  17. public bool IsComplete => true;
  18. /// <summary>
  19. /// This is a 7Zip Anti item
  20. /// </summary>
  21. public bool IsAnti => FilePart.Header.IsAnti;
  22. }
  23. }