protected internal virtual LhaEntry ReadHeader_Lv2(byte[] @base) { LhaEntry e = new LhaEntry(); e.SetMethod(encoding.GetString(@base, HDR2_OFF_METHOD, 5)); e.SetCompressedSize(Get32(@base, HDR2_OFF_COMPSIZE)); e.SetOriginalSize(Get32(@base, HDR2_OFF_ORIGSIZE)); e.SetHeaderTimeStamp(Get32(@base, HDR2_OFF_TIMESTAMP)); calcCRC.Update(@base, 0, @base.Length); byte[] buf = new byte[2]; if (binaryReader.Read(buf, 0, buf.Length) != buf.Length) { throw (new LhaException("Lha header is broken (cannot read crc value)")); } e.SetCRC(Get16(buf, 0)); calcCRC.Update(buf, 0, buf.Length); buf = new byte[1]; if (binaryReader.Read(buf, 0, buf.Length) != buf.Length) { throw (new LhaException("Lha header is broken (cannot read os signature)")); } e.SetOS(buf[0]); calcCRC.Update(buf, 0, buf.Length); buf = new byte[2]; if (binaryReader.Read(buf, 0, buf.Length) != buf.Length) { throw (new LhaException("Lha header is broken (cannot read ext)")); } calcCRC.Update(buf, 0, buf.Length); for (int next = Get16(buf, 0); next > 0; next = ReadExHeader(e, next)) { ; } e.SetPath(dirName + fileName); return(e); }