Re: [protobuf] Number of Bits Written to Memory

2011-02-22 Thread Kenton Varda
Protobufs provide their own encoding.  You can't control exactly how the
bytes are written, unless you write your own encoder, which would defeat the
purpose.

On Thu, Feb 3, 2011 at 8:58 AM, Tanya turtle...@gmail.com wrote:

 Hi, we are looking at replacing a XML/JAXB project with something
 similar to protocol buffers, especially since it's multi-platform, but
 there are a couple of concerns we have seen that would prevent us from
 switching. I'd like to verify that what we think is actually true
 before passing on what seems to be a very cool solution Google has
 come up with.

 My main question revolves around how the bytes are stored. In our
 current solution, we store by bit, so some items have very strange
 amounts of bits being stored (i.e. 5 bits, 14 bits). We noticed that
 protocol buffers seem to only store by byte or word (very even amounts
 of bits) and have a unique way of encoding.

 Basically, we need some way of specifying how the bytes are encoded/
 written to memory, and we need to specify the number of bits written
 each time. Is this possible to do in protocol buffers? And if so, how
 would it be accomplished?

 Thanks. Any help is greatly appreciated.

 --
 You received this message because you are subscribed to the Google Groups
 Protocol Buffers group.
 To post to this group, send email to protobuf@googlegroups.com.
 To unsubscribe from this group, send email to
 protobuf+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/protobuf?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



Re: [protobuf] Number of Bits Written to Memory

2011-02-04 Thread Brian Palmer
On Thu, Feb 3, 2011 at 8:58 AM, Tanya turtle...@gmail.com wrote:

 Basically, we need some way of specifying how the bytes are encoded/
 written to memory, and we need to specify the number of bits written
 each time. Is this possible to do in protocol buffers? And if so, how
 would it be accomplished?


Hi, Tanya. I'm not a protocol buffer expert at all, and you know your
problem domain best, of course, but are you sure that you've fully
identified your needs? You can use protocol buffers as data storage where
you access fields, and you can use them to efficiently transmit data across
the wire, but protobufs don't seem well suited to this sort of micromanaged
control that you're talking about.

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.