internal static RarHeader Create(RarCrcBinaryReader reader) { try { RarHeader header = new RarHeader(); reader.Mark(); header.ReadStartFromReader(reader); header.ReadBytes += reader.CurrentReadByteCount; return(header); } catch (EndOfStreamException) { return(null); } }
internal static RarHeader Create(RarCrcBinaryReader reader, ArchiveEncoding archiveEncoding) { try { RarHeader header = new RarHeader(); header.ArchiveEncoding = archiveEncoding; reader.Mark(); header.ReadStartFromReader(reader); header.ReadBytes += reader.CurrentReadByteCount; return header; } catch (EndOfStreamException) { return null; } }