decompress rar file loss #429

Open
opened 2026-01-29 22:11:51 +00:00 by claunia · 0 comments
Owner

Originally created by @sherleyshen on GitHub (Dec 23, 2020).

hi, i'm trying to decompress some rar file, and since i only have the authentification of one StorageFolder which can receive the decompressed file. i have tried following methods:
`
Capture
Capture的

using(var entryStream = reader.OpenEntryStream())
{
StorageFile newFile = await folder.CreateFileAsync(pathToRar);
Stream fileStream = await (newFile).OpenStreamForWriteAsync();
entryStream.CopyTo(fileStream,(int)entryStream.Length);
entryStream.Dispose();
}
and
StorageFile newFile = await folder.CreateFileAsync(pathToRar);
Stream fileStream = await (newFile).OpenStreamForWriteAsync();
reader.WriteEntryTo(fileStream);
`
turns out that after decompressing some rarEntries with small size are Empty now.

Originally created by @sherleyshen on GitHub (Dec 23, 2020). hi, i'm trying to decompress some rar file, and since i only have the authentification of one StorageFolder which can receive the decompressed file. i have tried following methods: ` ![Capture](https://user-images.githubusercontent.com/17906218/102950240-3158fa80-4505-11eb-854a-ac8297885e63.PNG) ![Capture的](https://user-images.githubusercontent.com/17906218/102950244-328a2780-4505-11eb-88b1-4daa0f11be1e.PNG) using(var entryStream = reader.OpenEntryStream()) { StorageFile newFile = await folder.CreateFileAsync(pathToRar); Stream fileStream = await (newFile).OpenStreamForWriteAsync(); entryStream.CopyTo(fileStream,(int)entryStream.Length); entryStream.Dispose(); } ` and ` StorageFile newFile = await folder.CreateFileAsync(pathToRar); Stream fileStream = await (newFile).OpenStreamForWriteAsync(); reader.WriteEntryTo(fileStream); ` turns out that after decompressing some rarEntries with small size are Empty now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#429