You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce encoding::Decoder to bundle encoding factory with options
Summary:
Introduce `encoding::Decoder` class that bundles a decode function with
`Encoding::Options` into a single object. This replaces the pattern of
threading a bare `std::function` encoding factory through multiple layers
(`NimbleData`, `ChunkedDecoder`, `NimbleParams`).
Named constructors:
- `encoding::Decoder::create(Options)` — uses `EncodingFactory::decode`
- `encoding::Decoder::createLegacy(Options)` — uses `legacy::EncodingFactory::decode`
This is a pure refactoring with no behavioral change. It simplifies the
selective reader code by replacing 10+ line inline lambda ternaries with
concise `encoding::Decoder::create()` / `createLegacy()` calls, and
prepares the codebase for threading additional options (like varint row
counts) without touching every callsite.
The `Decoder` class lives in `namespace facebook::nimble::encoding` and in a
separate BUCK target (`encoding_decoder`) to avoid a circular dependency
between `encodings` and `legacy/encodings`.
Differential Revision: D97367204
0 commit comments