[protobuf] Re: Issue 269 in protobuf: Would like to have byte or int8 type for the message definition

2013-01-29 Thread protobuf
Comment #3 on issue 269 by xiaof...@google.com: Would like to have byte or int8 type for the message definition http://code.google.com/p/protobuf/issues/detail?id=269 Re kumar.sumit: How are you going to use the byte field to implement a fixed length string? If byte can, why can't int32?

[protobuf] Compress proto to string

2013-01-29 Thread David Granados
Hello. I sucesfully compress/decompress a proto object using files, but i now need to do it same, but using string (no using files). This code works fine for files: google::protobuf::io::FileOutputStream file_stream(filedescriptor); GzipOutputStream::Options options; options.format =

[protobuf] Re: Compress proto to string

2013-01-29 Thread David Granados
this does not work :-( 212 // Definimos el buffer al cual vamos a comprimir 213 const unsigned bufLength = 256; 214 unsigned char buffer[bufLength]; 215 216 memset(buffer,0,256); 217 218 219 std::cout buffer std::endl; 220

Re: [protobuf] Re: Compress proto to string

2013-01-29 Thread Oliver Jowett
On Tue, Jan 29, 2013 at 11:23 AM, David Granados deivi...@gmail.com wrote: this does not work :-( That's not really a useful description of the problem. 229 google::protobuf::io::GzipOutputStream gzip_stream(arrayStream); 230 if

Re: [protobuf] Re: Compress proto to string

2013-01-29 Thread Oliver Jowett
(Readding the list cc:) On Tue, Jan 29, 2013 at 4:32 PM, David Granados deivi...@gmail.com wrote: Does not work :-( Size of proto before: 196, size of proto after gzip: 196 What measures this? Nothing in any code you quoted. Now my code are: 206 template class T int 207