kshchepanovskyi / protostuff-googlecode-exported

Automatically exported from code.google.com/p/protostuff
Apache License 2.0
0 stars 1 forks source link

How can I serialize a negative int32 to the protobuf format using zigzag encoding? #162

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
1.0.7

a java class is defined like this:

public class Test
{
    @Tag(value = 1)
    public int num;
}

questions is how can i serialize this obj to the protobuf format using zigzag 
encoding? thanks!

Original issue reported on code.google.com by chenshun...@gmail.com on 23 Sep 2014 at 8:33

GoogleCodeExporter commented 9 years ago
Perhaps a @Tag(value = 1, signed = true) could give a hint to 
protostuff-runtime (not yet implemented) which would call output.writeSInt32 
instead.

Original comment by david.yu...@gmail.com on 23 Sep 2014 at 11:05

GoogleCodeExporter commented 9 years ago
Thanks! 
expecting this feature will be presented in the upcoming version:)

Original comment by chenshun...@gmail.com on 23 Sep 2014 at 11:42