I sometimes do get " Invalid Rar Header: 174" exceptions, when I do process RAR files.
The rar files are ok. I basically scan for interesting data in the binary streams of
all files in a rar file.
fileStreamIn = new FileStream(fileName, FileMode.Open, FileAccess.Read,FileShare.ReadWrite,1024222222,FileOptions.SequentialScan );
reader=SharpCompress.Reader.ReaderFactory.Open(fileStreamIn,SharpCompress.Common.Options.LookForHeader);
while ( reader.MoveToNextEntry())
{
if (!reader.Entry.IsDirectory)
{
}
This is the exception:
: Invalid Rar Header: 174
Source: SharpCompress
Data: System.Collections.ListDictionaryInternal
HelpLink
TargetSite bei SharpCompress.Common.Rar.Headers.RarHeaderFactory.ReadNextHeader(Stream stream)
bei SharpCompress.Common.Rar.Headers.RarHeaderFactory.<ReadHeaders>d__0.MoveNext()
bei SharpCompress.Common.Rar.RarVolume.<GetVolumeFileParts>d__0.MoveNext()
bei SharpCompress.Reader.Rar.RarReader.<GetEntries>d__0.MoveNext()
bei SharpCompress.Reader.AbstractReader
Any ideas??
Regards
Walter
The rar files are ok. I basically scan for interesting data in the binary streams of
all files in a rar file.
fileStreamIn = new FileStream(fileName, FileMode.Open, FileAccess.Read,FileShare.ReadWrite,1024222222,FileOptions.SequentialScan );
reader=SharpCompress.Reader.ReaderFactory.Open(fileStreamIn,SharpCompress.Common.Options.LookForHeader);
while ( reader.MoveToNextEntry())
{
if (!reader.Entry.IsDirectory)
{
entryStream = reader.OpenEntryStream ();
if (entryStream.CanRead)
{
logfileParser.ProcessStream(entryStream);
}
}}
This is the exception:
: Invalid Rar Header: 174
Source: SharpCompress
Data: System.Collections.ListDictionaryInternal
HelpLink
TargetSite bei SharpCompress.Common.Rar.Headers.RarHeaderFactory.ReadNextHeader(Stream stream)
bei SharpCompress.Common.Rar.Headers.RarHeaderFactory.<ReadHeaders>d__0.MoveNext()
bei SharpCompress.Common.Rar.RarVolume.<GetVolumeFileParts>d__0.MoveNext()
bei SharpCompress.Reader.Rar.RarReader.<GetEntries>d__0.MoveNext()
bei SharpCompress.Reader.AbstractReader
2.NextEntryForCurrentStream()
bei SharpCompress.Reader.AbstractReader
2.MoveToNextEntry()Any ideas??
Regards
Walter