AVHeader.cs 854 B

123456789101112131415161718192021222324252627282930
  1. using SharpCompress.IO;
  2. namespace SharpCompress.Common.Rar.Headers
  3. {
  4. internal class AvHeader : RarHeader
  5. {
  6. public AvHeader(RarHeader header, RarCrcBinaryReader reader)
  7. : base(header, reader, HeaderType.Av)
  8. {
  9. if (IsRar5)
  10. throw new InvalidFormatException("unexpected rar5 record");
  11. }
  12. protected override void ReadFinish(MarkingBinaryReader reader)
  13. {
  14. UnpackVersion = reader.ReadByte();
  15. Method = reader.ReadByte();
  16. AvVersion = reader.ReadByte();
  17. AvInfoCrc = reader.ReadInt32();
  18. }
  19. internal int AvInfoCrc { get; private set; }
  20. internal byte UnpackVersion { get; private set; }
  21. internal byte Method { get; private set; }
  22. internal byte AvVersion { get; private set; }
  23. }
  24. }