Rar entry stream not read entirely outside original scope #540

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

Originally created by @TomerElya on GitHub (Nov 20, 2022).

Hey. The findings I am bringing here are only what I have come so far to discover about my problem, I could also be missing the actual problem here.
What's happening is that I have a rar which I iterate its entries and open a stream to each. Each stream is then assigned to a property "inputStream" in a class I'm creating. The created class instance is then returned from my function and later on used in a different function.
Then, in any way that I have tried to read the entry stream I have come across the same problem. It's not read entirely and only partially. I.e. the length of my stream is 50k bytes and it only reads 20k.
That only happens when I read the rarstream outside of the scope it was created in. If I try to read in the same scope where the OpenEntryStream() was called, it works perfectly.

I know I am not providing code here because I am very limited here but I'll try to do my best if it's really necessary
Would love some help, thanks!

Originally created by @TomerElya on GitHub (Nov 20, 2022). Hey. The findings I am bringing here are only what I have come so far to discover about my problem, I could also be missing the actual problem here. What's happening is that I have a rar which I iterate its entries and open a stream to each. Each stream is then assigned to a property "inputStream" in a class I'm creating. The created class instance is then returned from my function and later on used in a different function. Then, in any way that I have tried to read the entry stream I have come across the same problem. It's not read entirely and only partially. I.e. the length of my stream is 50k bytes and it only reads 20k. That only happens when I read the rarstream outside of the scope it was created in. If I try to read in the same scope where the OpenEntryStream() was called, it works perfectly. I know I am not providing code here because I am very limited here but I'll try to do my best if it's really necessary Would love some help, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#540