Skip to content

Conversation

@xianshijing-lk
Copy link
Contributor

So that we don't need to use base64 to encode the string, which adds 33% of overhead

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2026

⚠️ No Changeset found

Latest commit: 840ee54

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

uint32 response_timeout_ms = 4;
uint32 version = 5;
// Compressed payload data. When set, this field is used instead of `payload`.
bytes compressed_payload = 6;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is an alternative a possible consideration? A field like

enum Encoding {
     BASE64 = 0;   --> to ensure default remains the same
     COMPRESSION_TYPE_1 = 1; 
     COMPRESSION_TYPE_2 = 2;
}

This allows an extensible format and we can have any encoding.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for this suggestion

@xianshijing-lk
Copy link
Contributor Author

A gentle ping, what do you think about the comment ? I am open to adding an enum, but would like to get confirmation we want to do it with this PR now

@boks1971
Copy link
Contributor

A gentle ping, what do you think about the comment ? I am open to adding an enum, but would like to get confirmation we want to do it with this PR now

Not sure who you were addressing to @xianshijing-lk . I think an enum in this PR would be great. Doing one version with compressed_bytes and changing again later to an enum seems to me would make life more difficult down the line.

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.

3 participants