You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using MemoryPackSerializer.DeserializeAsync with a FileStream, the expectation is that after deserializing an object from the stream, the stream's position should move forward only by the number of bytes required to deserialize that specific object. However, after the first call to DeserializeAsync, the stream is fully consumed, making it impossible to deserialize subsequent objects from the same stream without resetting the position.
Other types of Streams might also be affected, i havent tested that tho.
When using MemoryPackSerializer.DeserializeAsync with a FileStream, the expectation is that after deserializing an object from the stream, the stream's position should move forward only by the number of bytes required to deserialize that specific object. However, after the first call to DeserializeAsync, the stream is fully consumed, making it impossible to deserialize subsequent objects from the same stream without resetting the position.
Other types of Streams might also be affected, i havent tested that tho.
Example Code:
With the current version of MemoryPack (
1.21.3
) on .NET8 this throws at theif(fs.Position != positionOne)
The text was updated successfully, but these errors were encountered: