Use winrar to encrypt files, and file name encryption, throw an error when using SharpCompress to decompress #410

Open
opened 2026-01-29 22:11:30 +00:00 by claunia · 1 comment
Owner

Originally created by @toolgood on GitHub (Aug 20, 2020).

Use winrar to encrypt files, and file name encryption, throw an error when using SharpCompress to decompress

.net core 3.1
SharpCompress Version=0.26.0

throw error: SharpCompress Arithmetic operation resulted in an overflow.

at SharpCompress.IO.MarkingBinaryReader.ReadRarVIntByte(Int32 maxBytes)
at SharpCompress.Common.Rar.Headers.RarHeader..ctor(RarCrcBinaryReader reader, Boolean isRar5, ArchiveEncoding archiveEncoding)
at SharpCompress.Common.Rar.Headers.RarHeader.TryReadBase(RarCrcBinaryReader reader, Boolean isRar5, ArchiveEncoding archiveEncoding)
at SharpCompress.Common.Rar.Headers.RarHeaderFactory.TryReadNextHeader(Stream stream)
at SharpCompress.Common.Rar.Headers.RarHeaderFactory.d__12.MoveNext()
at SharpCompress.Common.Rar.RarVolume.d__10.MoveNext()
at System.Collections.Generic.LargeArrayBuilder1.AddRange(IEnumerable1 items)
at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)
at SharpCompress.Archives.Rar.FileInfoRarArchiveVolume..ctor(FileInfo fileInfo, ReaderOptions options)
at SharpCompress.Archives.Rar.RarArchiveVolumeFactory.d__1.MoveNext()
at SharpCompress.LazyReadOnlyCollection1.LazyLoader.MoveNext() at SharpCompress.Archives.Rar.RarArchiveEntryFactory.<GetFileParts>d__0.MoveNext() at SharpCompress.Archives.Rar.RarArchiveEntryFactory.<GetMatchedFileParts>d__1.MoveNext() at SharpCompress.Archives.Rar.RarArchiveEntryFactory.<GetEntries>d__2.MoveNext() at SharpCompress.LazyReadOnlyCollection1.LazyLoader.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at SharpCompress.Archives.IArchiveExtensions.WriteToDirectory(IArchive archive, String destinationDirectory, ExtractionOptions options)

Originally created by @toolgood on GitHub (Aug 20, 2020). Use winrar to encrypt files, and file name encryption, throw an error when using SharpCompress to decompress .net core 3.1 SharpCompress Version=0.26.0 throw error: SharpCompress Arithmetic operation resulted in an overflow. at SharpCompress.IO.MarkingBinaryReader.ReadRarVIntByte(Int32 maxBytes) at SharpCompress.Common.Rar.Headers.RarHeader..ctor(RarCrcBinaryReader reader, Boolean isRar5, ArchiveEncoding archiveEncoding) at SharpCompress.Common.Rar.Headers.RarHeader.TryReadBase(RarCrcBinaryReader reader, Boolean isRar5, ArchiveEncoding archiveEncoding) at SharpCompress.Common.Rar.Headers.RarHeaderFactory.TryReadNextHeader(Stream stream) at SharpCompress.Common.Rar.Headers.RarHeaderFactory.<ReadHeaders>d__12.MoveNext() at SharpCompress.Common.Rar.RarVolume.<GetVolumeFileParts>d__10.MoveNext() at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items) at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at SharpCompress.Archives.Rar.FileInfoRarArchiveVolume..ctor(FileInfo fileInfo, ReaderOptions options) at SharpCompress.Archives.Rar.RarArchiveVolumeFactory.<GetParts>d__1.MoveNext() at SharpCompress.LazyReadOnlyCollection`1.LazyLoader.MoveNext() at SharpCompress.Archives.Rar.RarArchiveEntryFactory.<GetFileParts>d__0.MoveNext() at SharpCompress.Archives.Rar.RarArchiveEntryFactory.<GetMatchedFileParts>d__1.MoveNext() at SharpCompress.Archives.Rar.RarArchiveEntryFactory.<GetEntries>d__2.MoveNext() at SharpCompress.LazyReadOnlyCollection`1.LazyLoader.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at SharpCompress.Archives.IArchiveExtensions.WriteToDirectory(IArchive archive, String destinationDirectory, ExtractionOptions options)
claunia added the enhancementup for grabs labels 2026-01-29 22:11:30 +00:00
Author
Owner

@adamhathcock commented on GitHub (Aug 21, 2020):

Rar5 decryption isn't implemented

@adamhathcock commented on GitHub (Aug 21, 2020): Rar5 decryption isn't implemented
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#410