Let `SerializedMessageReader2` use the `riegeli::TargetT` mechanism for
initializing field handlers instead of `std::decay_t`. This allows to use
`riegeli::Maker()` for constructing them in-place.

Make `SerializedMessageReader2` a value type in Riegeli style, with default
constructor and `Reset()`, to enable late initialization.

Raw pointers to proper field handlers are no longer automatically treated
as field handlers. References are supported instead, which is more natural,
because calling member functions on references is not special.

With `riegeli::TargetT`, `std::cref(field_handler)` deduces a reference type as
the type to store. This replaces a raw pointer.

In a future change, this will make using `FieldHandlerMap` easier, often
constructing it in-place instead of using `std::cref()`.

PiperOrigin-RevId: 847862733
4 files changed
tree: 2fe61f15539d89e835a4eecfde0874fd5b825f5c
  1. doc/
  2. python/
  3. riegeli/
  4. tf_dependency/
  5. .bazelrc
  6. configure
  7. CONTRIBUTING.md
  8. LICENSE
  9. MANIFEST.in
  10. MODULE.bazel
  11. README.md
README.md

Riegeli

Riegeli/records is a file format for storing a sequence of string records, typically serialized protocol buffers. It supports dense compression, fast decoding, seeking, detection and optional skipping of data corruption, filtering of proto message fields for even faster decoding, and parallel encoding.

See documentation.

Status

Riegeli file format will only change in a backward compatible way (i.e. future readers will understand current files, but current readers might not understand files using future features).

Riegeli C++ API might change in incompatible ways.