-
Notifications
You must be signed in to change notification settings - Fork 0
Add binary codecs and windowed I/O for matrix data #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jsaarimaa
commented
Jan 14, 2026
- Introduce IBinaryValueCodec interface and codecs for Double, Float, Int16, Int24, Int32, UInt16, UInt24, UInt32 with sentinel support
- Add BinaryDataReader for efficient windowed/chunked reading from streams and chunk providers
- Add comprehensive unit tests for codecs and BinaryDataReader, including edge cases and cancellation
- Add helper test streams for simulating seekable and non-seekable sources
- Refactor MatrixMapExtensions: unify GetSize() to return long, update all usages, remove obsolete methods
- Bump all projects to .NET 9.0 and update package version to 1.3.0
- Add Copilot instructions and update solution to include them
- Minor code style and using directive cleanups throughout
- Introduce IBinaryValueCodec interface and codecs for Double, Float, Int16, Int24, Int32, UInt16, UInt24, UInt32 with sentinel support - Add BinaryDataReader<TCodec> for efficient windowed/chunked reading from streams and chunk providers - Add comprehensive unit tests for codecs and BinaryDataReader, including edge cases and cancellation - Add helper test streams for simulating seekable and non-seekable sources - Refactor MatrixMapExtensions: unify GetSize() to return long, update all usages, remove obsolete methods - Bump all projects to .NET 9.0 and update package version to 1.3.0 - Add Copilot instructions and update solution to include them - Minor code style and using directive cleanups throughout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces binary data codecs and windowed I/O capabilities for efficient matrix data handling, upgrades the project to .NET 9.0, and performs refactoring to improve code consistency and maintainability.
Changes:
- Introduced binary value codecs (Double, Float, Int16, Int24, Int32, UInt16, UInt24, UInt32) with sentinel-based DataValueType mapping
- Added BinaryDataReader for efficient windowed/chunked reading from streams and chunk providers
- Upgraded all projects from .NET 8.0 to .NET 9.0 and bumped package version to 1.3.0
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Px.Utils/BinaryData/ValueConverters/*.cs | New codec implementations for binary value encoding/decoding with sentinel support |
| Px.Utils/BinaryData/BinaryDataReader.cs | New windowed I/O reader supporting both seekable and non-seekable streams |
| Px.Utils/Models/Metadata/ExtensionMethods/MatrixMapExtensions.cs | Unified GetSize() to return long, removed obsolete GetSizeLong() method |
| Px.Utils.UnitTests/BinaryData/*.cs | Comprehensive test coverage for codecs and BinaryDataReader |
| Px.Utils/PxFile/Metadata/PxFileMetadataReader.cs | Updated to use ReadExactly methods for more robust stream reading |
| *.csproj | Upgraded target framework from net8.0 to net9.0 |
| .github/copilot-instructions.md | Added project-specific coding conventions and guidelines |
Comments suppressed due to low confidence (2)
Px.Utils/BinaryData/ValueConverters/FloatCodec.cs:1
- The test initializes output array with length 4 but only writes 3 input values. Either reduce the expected length to 3 or add a fourth input value.
using Px.Utils.Models.Data.DataValue;
Px.Utils/BinaryData/ValueConverters/FloatCodec.cs:1
- The catch block catches a generic Exception. Use Assert.ThrowsExactly to specify the expected exception type for more precise test validation.
using Px.Utils.Models.Data.DataValue;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Px.Utils/Models/Metadata/ExtensionMethods/MatrixMapExtensions.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 43 out of 43 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.