protocol buffer lite versus regular protocol buffer

20,087

The "lite" version is not able to serialize to or from iostream, or "FileDescriptor", and it cannot use the Reflection feature (although it does use refection), and... a scattering of other features.

My advice is to just use the lite version until you come across a feature that requires the full version. It is very easy to switch from one to the other.

If you need to see a list of what the lite version lacks, I recommend browsing <google/protobuf/message.h>. Basically everything in that include file is exclusive to the full version. (<google/protobuf/message_lite.h> is #included from the full version.) Here's a link: https://github.com/google/protobuf/blob/master/src/google/protobuf/message.h

Share:
20,087

Related videos on Youtube

lurscher
Author by

lurscher

Updated on September 15, 2021

Comments

  • lurscher
    lurscher almost 3 years

    I've been investigating c++ serialization frameworks will small footprint and good performance. I've found this thread

    c++ network serialization

    which basically suggest to use the lite version of protocol buffers. It is not clear from this page what are the specific features of the lite version

    my question is; what features do you lose when sticking to protocol buffers lite?

  • rustyx
    rustyx over 7 years
    Don't forget to add option optimize_for = LITE_RUNTIME; to your .proto files if you use the lite version.
  • coredump
    coredump about 5 years
    Reading above comments is an emotional roller coaster.
  • Geezer
    Geezer almost 3 years
    Edited to reflect existence (at present) of SerializeToOstream() in class MessageLite