var bytes = [some byte array];
// Using a 4096 buffer from the array pool
using var memoryStream = new MemoryStream(ArrayPool<byte>.Shared.Rent(4096));
await memoryStream.WriteAsync(bytes, 0, bytes.Length);
return await ParquetSerializer.DeserializeAsync<T>(memoryStream, ParquetOptions.ParquetOptions);
Library Version
4.17.0
OS
Windows
OS Architecture
64 bit
How to reproduce?
Write this code or similar:
And you get:
The reason is the ValidateFileAsync method seeks the tail at the end of stream, which will always be 0 when the buffer is not filled:
https://github.com/aloneguid/parquet-dotnet/blob/9dcd02ec3e2120d31dd85ed31afc9255c2fc8f5c/src/Parquet/ParquetActor.cs#L42C50-L42C50
This would probably fix it:
Failing test
No response