Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
        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;
            }
        }