A byte-valued endian-formatted tiff value buffer#324
Merged
Conversation
Provides interaction between decoder and encoder values. Not sure about this commit yet, the implementation is a bit odd.
This reverts commit 45f617b
fintelia
approved these changes
Jan 10, 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.
Previously we introduced
ByteOrderas an explicit, public, property of values and now it makes sense to group it together with theTypeto create a type-erased buffer which can represent arbitrary endian-adjusted Tiff values:tags::ValueBuffer. This will let us somewhat cleanly express a link between decoder and encoder which was otherwise spotty due to the former handling types as enum-variants (a closed set), and the latter presenting everything in native types (an open set) and an awkward approach to lists in the decoder. See "Construct ValueBuffer from TiffValue" which is reverted since I don't want to introduce that functionality while demonstrating that it would work and having a commit to go off of; and it may be more sensible to instead have a method to fill the buffer from aDecoderinstead of that conversion.As a consequence we give the
Encodera public interface for creating raw directory entries (that may be written to writer or the offset field). That was previously only possible for entries actually added to a directory encoder's directory while confusingly sharing itsTiffValueAPI with the possibility of writing raw values that are actually being compressed. In terms of semantic clarification that is best left for another PR.