Implement start position read API (issue #23)#46
Merged
JamesWiresmith merged 2 commits intomainfrom Jan 30, 2026
Merged
Conversation
adc244b to
db31ca1
Compare
JamesWiresmith
requested changes
Jan 22, 2026
be6cc18 to
ede0813
Compare
* Added the ability to select a start offset in the read API (#23) * This involved significant refactoring of the read logic.
ede0813 to
294cabe
Compare
JamesWiresmith
approved these changes
Jan 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the start position read API as outlined in the implementation plan (issue #23). It adds the ability to read channel data starting from a specific sample position, with optimizations for skipping entire data blocks.
Changes
New API
read_channel_from(channel, start, output)method toTdmsFileread_channel()to useread_channel_from()internally for consistencyImplementation Details
read_single_from()andread_from()methods toDataBlockMultiChannelContigousReaderwithread_from()for offset supportMultiChannelInterleavedReaderwithread_from()for offset supportPerformance Optimizations
Testing
tests/read_with_offset.rsBackward Compatibility
The implementation maintains full backward compatibility:
read_channel()method signature is unchangedread_channel_from()methodRelated Issues
Closes #23
Testing
All existing tests should pass, and new tests have been added to verify the offset reading functionality.
Documentation
The new method includes comprehensive documentation explaining: