For all of custom sections we have we use Optional<yaml::BinaryRef> for
describing Content. A BinaryRef is a specialized YAMLIO scalar type for
representing a binary blob. Because of this we dump a content as a single string.
This string is dumped in a one line and there is no way to split it and
add proper comments for each part.
I was asked today about possibility of writing a custom
number of bytes and commenting the each group of them. It is useful for
crafting new types of sections.
I was surprised that we unable to do something like:
## Comment 0. Content: [ 0xfe, 0xfe, 0xfe, 0xfe, ## Comment 1. 0xfe, 0xfe, ## Comment 2. 0xfe, 0xfe ]
In this patch I did a change for RawContentSection for start,
now it accepts and prints the vector of bytes for a Content which
is now Optional<std::vector<uint8_t>>.
How does the idea of such change sound?