Skip to content

Comments

Delta encode KVPs#788

Open
RichLogan wants to merge 3 commits intomainfrom
delta-encode-kvp
Open

Delta encode KVPs#788
RichLogan wants to merge 3 commits intomainfrom
delta-encode-kvp

Conversation

@RichLogan
Copy link
Contributor

In Draft 16, KVPs are sorted and delta encoded on type.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 132f80809c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

std::size_t size = 0;
const auto type_val = static_cast<std::uint64_t>(type);
size += UintVar(type_val).size();
const auto delta = type - prev_type;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep enum KVP size computation compilable

KeyType explicitly allows scoped enums, but KeyValuePair::Size now does arithmetic directly on T (type - prev_type, and then % on type), which is ill-formed for enum class types like ParameterType. Any code path that instantiates KeyValuePair<ParameterType>::Size(...) will fail to compile, so this regresses the template contract compared with the previous cast-to-uint64_t approach.

Useful? React with 👍 / 👎.

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.

1 participant