Skip to content

A byte-valued endian-formatted tiff value buffer#324

Merged
197g merged 5 commits intomainfrom
encoder-tiff-value
Jan 10, 2026
Merged

A byte-valued endian-formatted tiff value buffer#324
197g merged 5 commits intomainfrom
encoder-tiff-value

Conversation

@197g
Copy link
Member

@197g 197g commented Jan 10, 2026

Previously we introduced ByteOrder as an explicit, public, property of values and now it makes sense to group it together with the Type to 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 a Decoder instead of that conversion.

As a consequence we give the Encoder a 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 its TiffValue API with the possibility of writing raw values that are actually being compressed. In terms of semantic clarification that is best left for another PR.

@197g 197g changed the title A byte-formatted tiff value buffer A byte-valued endian-formatted tiff value buffer Jan 10, 2026
@197g 197g merged commit cfff04c into main Jan 10, 2026
15 checks passed
@197g 197g deleted the encoder-tiff-value branch January 10, 2026 02:47
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.

2 participants