Skip to content
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

Request: read file position and value length of a tag without also reading the actual value #1873

Closed
bersbersbers opened this issue Aug 25, 2023 · 1 comment · Fixed by #1990

Comments

@bersbersbers
Copy link

Is your feature request related to a problem? Please describe.
I am unable to read the file position and value length of a tag without also reading the actual value. See an example code at https://stackoverflow.com/q/76897860/880783.

Describe the solution you'd like
I am looking for a way to access _dict[tag].value_tell and _dict[tag].length through a public API - namely, without acessing/decoding the data. Extending get_item to allow that would be one solution, as would be adding another getter method.

@darcymason
Copy link
Member

Looking at the code, I think Dataset.get_item could be extended with a keep_deferred argument (default False). We would just need the documentation very clear that the caller would get a None value if it was a deferred-read element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants