Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address a TODO about the need for DecompressedSize API #7788

Open
easwars opened this issue Oct 28, 2024 · 0 comments
Open

Address a TODO about the need for DecompressedSize API #7788

easwars opened this issue Oct 28, 2024 · 0 comments

Comments

@easwars
Copy link
Contributor

easwars commented Oct 28, 2024

With the switch to the new encoding API and the mem package, we have a TODO and some commented out code here: https://github.com/grpc/grpc-go/blob/master/rpc_util.go#L880-L900

It looks like there are no current usages of DecompressedSize defined here:

// If a Compressor implements `DecompressedSize(compressedBytes []byte) int`,

There is a definition of this method here:

func (c *compressor) DecompressedSize(buf []byte) int {

It looks to me that we could get rid of the commented out code in rpc_util.go and get rid of the docstring that says gRPC will use this if present.

@dfawley @PapaCharlie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant