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

Useless encoded data #606

Closed
osechet opened this issue Jan 2, 2017 · 0 comments
Closed

Useless encoded data #606

osechet opened this issue Jan 2, 2017 · 0 comments

Comments

@osechet
Copy link

osechet commented Jan 2, 2017

protobuf.js version: 6.3.1

Using the following message,

message Response {
    fixed32 id = 1;
    bytes data = 2;
    string error = 3;
}

when calling Response.encode(Response.create({error: 'error'})).finish(), I get: [18, 0, 26, 5, 101, 114, 114, 111, 114].

The 2 first bytes are useless.

If I call Response.encode({error: 'error'}).finish(), I get [26, 5, 101, 114, 114, 111, 114] which is fine.

@dcodeIO dcodeIO closed this as completed in fde56c0 Jan 2, 2017
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

No branches or pull requests

1 participant