Skip to content

Conversation

@jsaarimaa
Copy link
Collaborator

  • 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
@jsaarimaa jsaarimaa requested a review from Copilot January 14, 2026 14:33
Copy link
Contributor

Copilot AI left a 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.

@jsaarimaa jsaarimaa marked this pull request as ready for review January 14, 2026 14:37
@jsaarimaa jsaarimaa requested a review from Copilot January 15, 2026 09:47
Copy link
Contributor

Copilot AI left a 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.

@jsaarimaa jsaarimaa merged commit 7da8ec6 into dev Jan 15, 2026
8 checks passed
@jsaarimaa jsaarimaa deleted the feature/binary-codecs-and-readers branch January 15, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants