initial import from ruby-protocol-buffers gem