File extension for data in protobuf format

1,924 views
Skip to first unread message

Dan

unread,
Dec 9, 2009, 8:14:57 PM12/9/09
to Protocol Buffers
What do you guys use for your file extension when writing data in
protobuf format to a file? I'm guessing google doesn't use a file
extension.

Kenton Varda

unread,
Dec 9, 2009, 8:19:39 PM12/9/09
to Dan, Protocol Buffers
Since protobufs aren't self-describing, presumably every type of protobuf should use a different extension.  Otherwise, you wouldn't be able to tell what is inside, even if you know how it is encoded.


--

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



Dan

unread,
Dec 9, 2009, 11:01:30 PM12/9/09
to Protocol Buffers
I was thinking there could still be a general loose name that people
use just to say the message(s) in the file are encoded in protobuf and
clients are expected to know the structure. Sort of like an xml file
that doesn’t have a doctype or schema specified in the file but, not
really since an xml file still has a general structure that a generic
xml parser can parse. Your right, I would still need to know the
structure of the file and either have a proto file or the message(s)
would have to be self describing using some pattern. The encoding
plus the structure determines the file extension so if I came up with
the file structure I should come up with the extension.


On Dec 9, 8:19 pm, Kenton Varda <ken...@google.com> wrote:
> Since protobufs aren't self-describing, presumably every type of protobuf
> should use a different extension.  Otherwise, you wouldn't be able to tell
> what is inside, even if you know how it is encoded.
>
>
>
> On Wed, Dec 9, 2009 at 5:14 PM, Dan <lozi...@gmail.com> wrote:
> > What do you guys use for your file extension when writing data in
> > protobuf format to a file? I'm guessing google doesn't use a file
> > extension.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Protocol Buffers" group.
> > To post to this group, send email to prot...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > protobuf+u...@googlegroups.com<protobuf%2Bunsubscribe@googlegroups.c­om>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/protobuf?hl=en.- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages