TarArchiveEntry.cs 676 B

1234567891011121314151617181920212223242526272829
  1. using System.IO;
  2. using System.Linq;
  3. using SharpCompress.Common;
  4. using SharpCompress.Common.Tar;
  5. namespace SharpCompress.Archives.Tar
  6. {
  7. public class TarArchiveEntry : TarEntry, IArchiveEntry
  8. {
  9. internal TarArchiveEntry(TarArchive archive, TarFilePart part, CompressionType compressionType)
  10. : base(part, compressionType)
  11. {
  12. Archive = archive;
  13. }
  14. public virtual Stream OpenEntryStream()
  15. {
  16. return Parts.Single().GetCompressedStream();
  17. }
  18. #region IArchiveEntry Members
  19. public IArchive Archive { get; }
  20. public bool IsComplete => true;
  21. #endregion
  22. }
  23. }