17 #ifndef PAGESPEED_KERNEL_BASE_PROTO_UTIL_H_
18 #define PAGESPEED_KERNEL_BASE_PROTO_UTIL_H_
25 #include "google/protobuf/io/zero_copy_stream_impl_lite.h"
26 #include "google/protobuf/message.h"
27 #include "google/protobuf/message_lite.h"
28 #include "google/protobuf/repeated_field.h"
29 #include "google/protobuf/text_format.h"
31 namespace net_instaweb {
35 typedef google::protobuf::io::ArrayInputStream ArrayInputStream;
40 using namespace google::protobuf;
45 StringPiece sp, protobuf::MessageLite* proto) {
46 return proto->ParseFromArray(sp.data(), sp.size());
49 inline bool ParseTextFormatProtoFromString(
const GoogleString& s,
50 protobuf::Message* proto) {
51 return google::protobuf::TextFormat::ParseFromString(s, proto);
bool ParseProtoFromStringPiece(StringPiece sp, protobuf::MessageLite *proto)
namespace protobuf
Definition: proto_util.h:44
google::protobuf::io::StringOutputStream StringOutputStream
Definition: proto_util.h:34
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24