RarReaderEntry.cs 969 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections.Generic;
  2. using SharpCompress.Common;
  3. using SharpCompress.Common.Rar;
  4. using SharpCompress.Common.Rar.Headers;
  5. namespace SharpCompress.Readers.Rar
  6. {
  7. public class RarReaderEntry : RarEntry
  8. {
  9. internal RarReaderEntry(bool solid, RarFilePart part)
  10. {
  11. Part = part;
  12. IsSolid = solid;
  13. }
  14. internal RarFilePart Part { get; }
  15. internal override IEnumerable<FilePart> Parts => Part.AsEnumerable<FilePart>();
  16. internal override FileHeader FileHeader => Part.FileHeader;
  17. public override CompressionType CompressionType => CompressionType.Rar;
  18. /// <summary>
  19. /// The compressed file size
  20. /// </summary>
  21. public override long CompressedSize => Part.FileHeader.CompressedSize;
  22. /// <summary>
  23. /// The uncompressed file size
  24. /// </summary>
  25. public override long Size => Part.FileHeader.UncompressedSize;
  26. }
  27. }