What's the new version of IArchiveFile.CopyTo? #212
Replies: 1 comment 1 reply
-
|
The new version of CopyTo() is the code you mentioned in the second snippet.
As far as why there's an error, might just be a bug in FramedStream's implementation. I'm guessing you're on the newest BTW, congrats on the app/release! Looking super cool! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I used to have some very simple code:
Looks like
CopyDataTohas been removed in the current version, and presumably replaced byAsStream. But I can't getAsStreamto work. With the following code:I get this error:
I also get the same error by specifying an explicit size:
I set a breakpoint and can see that both
file.Sizeand the actualFramedStreamlength are both 29188, so I'm not actually asking it to write any more than what's available. I can't figure out where the value32768is coming from. Am I running into some confusion over compressed vs. uncompressed size, or is theFramedStreamimplementation just bugged?Also, I realize I can work around this by doing
fs.Write(file.GetSpan())(orGetBytes) for now, but it's going to be slower with the extra memory round trip.Beta Was this translation helpful? Give feedback.
All reactions