/src/genfiles/png_fuzz_proto.pb.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: png_fuzz_proto.proto |
3 | | |
4 | | #include "png_fuzz_proto.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/io/coded_stream.h> |
9 | | #include <google/protobuf/extension_set.h> |
10 | | #include <google/protobuf/wire_format_lite.h> |
11 | | #include <google/protobuf/descriptor.h> |
12 | | #include <google/protobuf/generated_message_reflection.h> |
13 | | #include <google/protobuf/reflection_ops.h> |
14 | | #include <google/protobuf/wire_format.h> |
15 | | // @@protoc_insertion_point(includes) |
16 | | #include <google/protobuf/port_def.inc> |
17 | | |
18 | | PROTOBUF_PRAGMA_INIT_SEG |
19 | | |
20 | | namespace _pb = ::PROTOBUF_NAMESPACE_ID; |
21 | | namespace _pbi = _pb::internal; |
22 | | |
23 | | PROTOBUF_CONSTEXPR IHDR::IHDR( |
24 | | ::_pbi::ConstantInitialized): _impl_{ |
25 | | /*decltype(_impl_._has_bits_)*/{} |
26 | | , /*decltype(_impl_._cached_size_)*/{} |
27 | | , /*decltype(_impl_.width_)*/0u |
28 | | , /*decltype(_impl_.height_)*/0u |
29 | | , /*decltype(_impl_.other1_)*/0u |
30 | | , /*decltype(_impl_.other2_)*/0u} {} |
31 | | struct IHDRDefaultTypeInternal { |
32 | | PROTOBUF_CONSTEXPR IHDRDefaultTypeInternal() |
33 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
34 | 0 | ~IHDRDefaultTypeInternal() {} |
35 | | union { |
36 | | IHDR _instance; |
37 | | }; |
38 | | }; |
39 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IHDRDefaultTypeInternal _IHDR_default_instance_; |
40 | | PROTOBUF_CONSTEXPR PLTE::PLTE( |
41 | | ::_pbi::ConstantInitialized): _impl_{ |
42 | | /*decltype(_impl_._has_bits_)*/{} |
43 | | , /*decltype(_impl_._cached_size_)*/{} |
44 | | , /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} |
45 | | struct PLTEDefaultTypeInternal { |
46 | | PROTOBUF_CONSTEXPR PLTEDefaultTypeInternal() |
47 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
48 | 0 | ~PLTEDefaultTypeInternal() {} |
49 | | union { |
50 | | PLTE _instance; |
51 | | }; |
52 | | }; |
53 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PLTEDefaultTypeInternal _PLTE_default_instance_; |
54 | | PROTOBUF_CONSTEXPR IDAT::IDAT( |
55 | | ::_pbi::ConstantInitialized): _impl_{ |
56 | | /*decltype(_impl_._has_bits_)*/{} |
57 | | , /*decltype(_impl_._cached_size_)*/{} |
58 | | , /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} |
59 | | struct IDATDefaultTypeInternal { |
60 | | PROTOBUF_CONSTEXPR IDATDefaultTypeInternal() |
61 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
62 | 0 | ~IDATDefaultTypeInternal() {} |
63 | | union { |
64 | | IDAT _instance; |
65 | | }; |
66 | | }; |
67 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IDATDefaultTypeInternal _IDAT_default_instance_; |
68 | | PROTOBUF_CONSTEXPR iCCP::iCCP( |
69 | | ::_pbi::ConstantInitialized): _impl_{ |
70 | | /*decltype(_impl_._has_bits_)*/{} |
71 | | , /*decltype(_impl_._cached_size_)*/{} |
72 | | , /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} |
73 | | struct iCCPDefaultTypeInternal { |
74 | | PROTOBUF_CONSTEXPR iCCPDefaultTypeInternal() |
75 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
76 | 0 | ~iCCPDefaultTypeInternal() {} |
77 | | union { |
78 | | iCCP _instance; |
79 | | }; |
80 | | }; |
81 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 iCCPDefaultTypeInternal _iCCP_default_instance_; |
82 | | PROTOBUF_CONSTEXPR OtherChunk::OtherChunk( |
83 | | ::_pbi::ConstantInitialized): _impl_{ |
84 | | /*decltype(_impl_._has_bits_)*/{} |
85 | | , /*decltype(_impl_._cached_size_)*/{} |
86 | | , /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} |
87 | | , /*decltype(_impl_.type_)*/{} |
88 | | , /*decltype(_impl_._oneof_case_)*/{}} {} |
89 | | struct OtherChunkDefaultTypeInternal { |
90 | | PROTOBUF_CONSTEXPR OtherChunkDefaultTypeInternal() |
91 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
92 | 0 | ~OtherChunkDefaultTypeInternal() {} |
93 | | union { |
94 | | OtherChunk _instance; |
95 | | }; |
96 | | }; |
97 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OtherChunkDefaultTypeInternal _OtherChunk_default_instance_; |
98 | | PROTOBUF_CONSTEXPR PngChunk::PngChunk( |
99 | | ::_pbi::ConstantInitialized): _impl_{ |
100 | | /*decltype(_impl_.chunk_)*/{} |
101 | | , /*decltype(_impl_._cached_size_)*/{} |
102 | | , /*decltype(_impl_._oneof_case_)*/{}} {} |
103 | | struct PngChunkDefaultTypeInternal { |
104 | | PROTOBUF_CONSTEXPR PngChunkDefaultTypeInternal() |
105 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
106 | 0 | ~PngChunkDefaultTypeInternal() {} |
107 | | union { |
108 | | PngChunk _instance; |
109 | | }; |
110 | | }; |
111 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PngChunkDefaultTypeInternal _PngChunk_default_instance_; |
112 | | PROTOBUF_CONSTEXPR PngProto::PngProto( |
113 | | ::_pbi::ConstantInitialized): _impl_{ |
114 | | /*decltype(_impl_._has_bits_)*/{} |
115 | | , /*decltype(_impl_._cached_size_)*/{} |
116 | | , /*decltype(_impl_.chunks_)*/{} |
117 | | , /*decltype(_impl_.ihdr_)*/nullptr} {} |
118 | | struct PngProtoDefaultTypeInternal { |
119 | | PROTOBUF_CONSTEXPR PngProtoDefaultTypeInternal() |
120 | 0 | : _instance(::_pbi::ConstantInitialized{}) {} |
121 | 0 | ~PngProtoDefaultTypeInternal() {} |
122 | | union { |
123 | | PngProto _instance; |
124 | | }; |
125 | | }; |
126 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PngProtoDefaultTypeInternal _PngProto_default_instance_; |
127 | | static ::_pb::Metadata file_level_metadata_png_5ffuzz_5fproto_2eproto[7]; |
128 | | static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_png_5ffuzz_5fproto_2eproto = nullptr; |
129 | | static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_png_5ffuzz_5fproto_2eproto = nullptr; |
130 | | |
131 | | const uint32_t TableStruct_png_5ffuzz_5fproto_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
132 | | PROTOBUF_FIELD_OFFSET(::IHDR, _impl_._has_bits_), |
133 | | PROTOBUF_FIELD_OFFSET(::IHDR, _internal_metadata_), |
134 | | ~0u, // no _extensions_ |
135 | | ~0u, // no _oneof_case_ |
136 | | ~0u, // no _weak_field_map_ |
137 | | ~0u, // no _inlined_string_donated_ |
138 | | PROTOBUF_FIELD_OFFSET(::IHDR, _impl_.width_), |
139 | | PROTOBUF_FIELD_OFFSET(::IHDR, _impl_.height_), |
140 | | PROTOBUF_FIELD_OFFSET(::IHDR, _impl_.other1_), |
141 | | PROTOBUF_FIELD_OFFSET(::IHDR, _impl_.other2_), |
142 | | 0, |
143 | | 1, |
144 | | 2, |
145 | | 3, |
146 | | PROTOBUF_FIELD_OFFSET(::PLTE, _impl_._has_bits_), |
147 | | PROTOBUF_FIELD_OFFSET(::PLTE, _internal_metadata_), |
148 | | ~0u, // no _extensions_ |
149 | | ~0u, // no _oneof_case_ |
150 | | ~0u, // no _weak_field_map_ |
151 | | ~0u, // no _inlined_string_donated_ |
152 | | PROTOBUF_FIELD_OFFSET(::PLTE, _impl_.data_), |
153 | | 0, |
154 | | PROTOBUF_FIELD_OFFSET(::IDAT, _impl_._has_bits_), |
155 | | PROTOBUF_FIELD_OFFSET(::IDAT, _internal_metadata_), |
156 | | ~0u, // no _extensions_ |
157 | | ~0u, // no _oneof_case_ |
158 | | ~0u, // no _weak_field_map_ |
159 | | ~0u, // no _inlined_string_donated_ |
160 | | PROTOBUF_FIELD_OFFSET(::IDAT, _impl_.data_), |
161 | | 0, |
162 | | PROTOBUF_FIELD_OFFSET(::iCCP, _impl_._has_bits_), |
163 | | PROTOBUF_FIELD_OFFSET(::iCCP, _internal_metadata_), |
164 | | ~0u, // no _extensions_ |
165 | | ~0u, // no _oneof_case_ |
166 | | ~0u, // no _weak_field_map_ |
167 | | ~0u, // no _inlined_string_donated_ |
168 | | PROTOBUF_FIELD_OFFSET(::iCCP, _impl_.data_), |
169 | | 0, |
170 | | PROTOBUF_FIELD_OFFSET(::OtherChunk, _impl_._has_bits_), |
171 | | PROTOBUF_FIELD_OFFSET(::OtherChunk, _internal_metadata_), |
172 | | ~0u, // no _extensions_ |
173 | | PROTOBUF_FIELD_OFFSET(::OtherChunk, _impl_._oneof_case_[0]), |
174 | | ~0u, // no _weak_field_map_ |
175 | | ~0u, // no _inlined_string_donated_ |
176 | | ::_pbi::kInvalidFieldOffsetTag, |
177 | | ::_pbi::kInvalidFieldOffsetTag, |
178 | | PROTOBUF_FIELD_OFFSET(::OtherChunk, _impl_.data_), |
179 | | PROTOBUF_FIELD_OFFSET(::OtherChunk, _impl_.type_), |
180 | | ~0u, |
181 | | ~0u, |
182 | | 0, |
183 | | ~0u, // no _has_bits_ |
184 | | PROTOBUF_FIELD_OFFSET(::PngChunk, _internal_metadata_), |
185 | | ~0u, // no _extensions_ |
186 | | PROTOBUF_FIELD_OFFSET(::PngChunk, _impl_._oneof_case_[0]), |
187 | | ~0u, // no _weak_field_map_ |
188 | | ~0u, // no _inlined_string_donated_ |
189 | | ::_pbi::kInvalidFieldOffsetTag, |
190 | | ::_pbi::kInvalidFieldOffsetTag, |
191 | | ::_pbi::kInvalidFieldOffsetTag, |
192 | | ::_pbi::kInvalidFieldOffsetTag, |
193 | | PROTOBUF_FIELD_OFFSET(::PngChunk, _impl_.chunk_), |
194 | | PROTOBUF_FIELD_OFFSET(::PngProto, _impl_._has_bits_), |
195 | | PROTOBUF_FIELD_OFFSET(::PngProto, _internal_metadata_), |
196 | | ~0u, // no _extensions_ |
197 | | ~0u, // no _oneof_case_ |
198 | | ~0u, // no _weak_field_map_ |
199 | | ~0u, // no _inlined_string_donated_ |
200 | | PROTOBUF_FIELD_OFFSET(::PngProto, _impl_.ihdr_), |
201 | | PROTOBUF_FIELD_OFFSET(::PngProto, _impl_.chunks_), |
202 | | 0, |
203 | | ~0u, |
204 | | }; |
205 | | static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
206 | | { 0, 10, -1, sizeof(::IHDR)}, |
207 | | { 14, 21, -1, sizeof(::PLTE)}, |
208 | | { 22, 29, -1, sizeof(::IDAT)}, |
209 | | { 30, 37, -1, sizeof(::iCCP)}, |
210 | | { 38, 48, -1, sizeof(::OtherChunk)}, |
211 | | { 51, -1, -1, sizeof(::PngChunk)}, |
212 | | { 62, 70, -1, sizeof(::PngProto)}, |
213 | | }; |
214 | | |
215 | | static const ::_pb::Message* const file_default_instances[] = { |
216 | | &::_IHDR_default_instance_._instance, |
217 | | &::_PLTE_default_instance_._instance, |
218 | | &::_IDAT_default_instance_._instance, |
219 | | &::_iCCP_default_instance_._instance, |
220 | | &::_OtherChunk_default_instance_._instance, |
221 | | &::_PngChunk_default_instance_._instance, |
222 | | &::_PngProto_default_instance_._instance, |
223 | | }; |
224 | | |
225 | | const char descriptor_table_protodef_png_5ffuzz_5fproto_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
226 | | "\n\024png_fuzz_proto.proto\"E\n\004IHDR\022\r\n\005width\030" |
227 | | "\001 \002(\r\022\016\n\006height\030\002 \002(\r\022\016\n\006other1\030\003 \002(\r\022\016\n" |
228 | | "\006other2\030\004 \002(\r\"\024\n\004PLTE\022\014\n\004data\030\001 \002(\014\"\024\n\004I" |
229 | | "DAT\022\014\n\004data\030\001 \002(\014\"\024\n\004iCCP\022\014\n\004data\030\002 \002(\014\"" |
230 | | "P\n\nOtherChunk\022\024\n\nknown_type\030\001 \001(\rH\000\022\026\n\014u" |
231 | | "nknown_type\030\002 \001(\rH\000\022\014\n\004data\030\003 \002(\014B\006\n\004typ" |
232 | | "e\"}\n\010PngChunk\022\025\n\004plte\030\001 \001(\0132\005.PLTEH\000\022\025\n\004" |
233 | | "idat\030\002 \001(\0132\005.IDATH\000\022\025\n\004iccp\030\003 \001(\0132\005.iCCP" |
234 | | "H\000\022#\n\013other_chunk\030\220N \001(\0132\013.OtherChunkH\000B" |
235 | | "\007\n\005chunk\":\n\010PngProto\022\023\n\004ihdr\030\001 \002(\0132\005.IHD" |
236 | | "R\022\031\n\006chunks\030\002 \003(\0132\t.PngChunk" |
237 | | ; |
238 | | static ::_pbi::once_flag descriptor_table_png_5ffuzz_5fproto_2eproto_once; |
239 | | const ::_pbi::DescriptorTable descriptor_table_png_5ffuzz_5fproto_2eproto = { |
240 | | false, false, 428, descriptor_table_protodef_png_5ffuzz_5fproto_2eproto, |
241 | | "png_fuzz_proto.proto", |
242 | | &descriptor_table_png_5ffuzz_5fproto_2eproto_once, nullptr, 0, 7, |
243 | | schemas, file_default_instances, TableStruct_png_5ffuzz_5fproto_2eproto::offsets, |
244 | | file_level_metadata_png_5ffuzz_5fproto_2eproto, file_level_enum_descriptors_png_5ffuzz_5fproto_2eproto, |
245 | | file_level_service_descriptors_png_5ffuzz_5fproto_2eproto, |
246 | | }; |
247 | 3 | PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_png_5ffuzz_5fproto_2eproto_getter() { |
248 | 3 | return &descriptor_table_png_5ffuzz_5fproto_2eproto; |
249 | 3 | } |
250 | | |
251 | | // Force running AddDescriptors() at dynamic initialization time. |
252 | | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_png_5ffuzz_5fproto_2eproto(&descriptor_table_png_5ffuzz_5fproto_2eproto); |
253 | | |
254 | | // =================================================================== |
255 | | |
256 | | class IHDR::_Internal { |
257 | | public: |
258 | | using HasBits = decltype(std::declval<IHDR>()._impl_._has_bits_); |
259 | 0 | static void set_has_width(HasBits* has_bits) { |
260 | 0 | (*has_bits)[0] |= 1u; |
261 | 0 | } |
262 | 0 | static void set_has_height(HasBits* has_bits) { |
263 | 0 | (*has_bits)[0] |= 2u; |
264 | 0 | } |
265 | 0 | static void set_has_other1(HasBits* has_bits) { |
266 | 0 | (*has_bits)[0] |= 4u; |
267 | 0 | } |
268 | 0 | static void set_has_other2(HasBits* has_bits) { |
269 | 0 | (*has_bits)[0] |= 8u; |
270 | 0 | } |
271 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
272 | 0 | return ((has_bits[0] & 0x0000000f) ^ 0x0000000f) != 0; |
273 | 0 | } |
274 | | }; |
275 | | |
276 | | IHDR::IHDR(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
277 | | bool is_message_owned) |
278 | 18.1k | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
279 | 18.1k | SharedCtor(arena, is_message_owned); |
280 | | // @@protoc_insertion_point(arena_constructor:IHDR) |
281 | 18.1k | } |
282 | | IHDR::IHDR(const IHDR& from) |
283 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
284 | 0 | IHDR* const _this = this; (void)_this; |
285 | 0 | new (&_impl_) Impl_{ |
286 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
287 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
288 | 0 | , decltype(_impl_.width_){} |
289 | 0 | , decltype(_impl_.height_){} |
290 | 0 | , decltype(_impl_.other1_){} |
291 | 0 | , decltype(_impl_.other2_){}}; |
292 | |
|
293 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
294 | 0 | ::memcpy(&_impl_.width_, &from._impl_.width_, |
295 | 0 | static_cast<size_t>(reinterpret_cast<char*>(&_impl_.other2_) - |
296 | 0 | reinterpret_cast<char*>(&_impl_.width_)) + sizeof(_impl_.other2_)); |
297 | | // @@protoc_insertion_point(copy_constructor:IHDR) |
298 | 0 | } |
299 | | |
300 | | inline void IHDR::SharedCtor( |
301 | 18.1k | ::_pb::Arena* arena, bool is_message_owned) { |
302 | 18.1k | (void)arena; |
303 | 18.1k | (void)is_message_owned; |
304 | 18.1k | new (&_impl_) Impl_{ |
305 | 18.1k | decltype(_impl_._has_bits_){} |
306 | 18.1k | , /*decltype(_impl_._cached_size_)*/{} |
307 | 18.1k | , decltype(_impl_.width_){0u} |
308 | 18.1k | , decltype(_impl_.height_){0u} |
309 | 18.1k | , decltype(_impl_.other1_){0u} |
310 | 18.1k | , decltype(_impl_.other2_){0u} |
311 | 18.1k | }; |
312 | 18.1k | } |
313 | | |
314 | 18.1k | IHDR::~IHDR() { |
315 | | // @@protoc_insertion_point(destructor:IHDR) |
316 | 18.1k | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
317 | 0 | (void)arena; |
318 | 0 | return; |
319 | 0 | } |
320 | 18.1k | SharedDtor(); |
321 | 18.1k | } |
322 | | |
323 | 18.1k | inline void IHDR::SharedDtor() { |
324 | 18.1k | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
325 | 18.1k | } |
326 | | |
327 | 0 | void IHDR::SetCachedSize(int size) const { |
328 | 0 | _impl_._cached_size_.Set(size); |
329 | 0 | } |
330 | | |
331 | 8 | void IHDR::Clear() { |
332 | | // @@protoc_insertion_point(message_clear_start:IHDR) |
333 | 8 | uint32_t cached_has_bits = 0; |
334 | | // Prevent compiler warnings about cached_has_bits being unused |
335 | 8 | (void) cached_has_bits; |
336 | | |
337 | 8 | cached_has_bits = _impl_._has_bits_[0]; |
338 | 8 | if (cached_has_bits & 0x0000000fu) { |
339 | 2 | ::memset(&_impl_.width_, 0, static_cast<size_t>( |
340 | 2 | reinterpret_cast<char*>(&_impl_.other2_) - |
341 | 2 | reinterpret_cast<char*>(&_impl_.width_)) + sizeof(_impl_.other2_)); |
342 | 2 | } |
343 | 8 | _impl_._has_bits_.Clear(); |
344 | 8 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
345 | 8 | } |
346 | | |
347 | 0 | const char* IHDR::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
348 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
349 | 0 | _Internal::HasBits has_bits{}; |
350 | 0 | while (!ctx->Done(&ptr)) { |
351 | 0 | uint32_t tag; |
352 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
353 | 0 | switch (tag >> 3) { |
354 | | // required uint32 width = 1; |
355 | 0 | case 1: |
356 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
357 | 0 | _Internal::set_has_width(&has_bits); |
358 | 0 | _impl_.width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
359 | 0 | CHK_(ptr); |
360 | 0 | } else |
361 | 0 | goto handle_unusual; |
362 | 0 | continue; |
363 | | // required uint32 height = 2; |
364 | 0 | case 2: |
365 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
366 | 0 | _Internal::set_has_height(&has_bits); |
367 | 0 | _impl_.height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
368 | 0 | CHK_(ptr); |
369 | 0 | } else |
370 | 0 | goto handle_unusual; |
371 | 0 | continue; |
372 | | // required uint32 other1 = 3; |
373 | 0 | case 3: |
374 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { |
375 | 0 | _Internal::set_has_other1(&has_bits); |
376 | 0 | _impl_.other1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
377 | 0 | CHK_(ptr); |
378 | 0 | } else |
379 | 0 | goto handle_unusual; |
380 | 0 | continue; |
381 | | // required uint32 other2 = 4; |
382 | 0 | case 4: |
383 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) { |
384 | 0 | _Internal::set_has_other2(&has_bits); |
385 | 0 | _impl_.other2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
386 | 0 | CHK_(ptr); |
387 | 0 | } else |
388 | 0 | goto handle_unusual; |
389 | 0 | continue; |
390 | 0 | default: |
391 | 0 | goto handle_unusual; |
392 | 0 | } // switch |
393 | 0 | handle_unusual: |
394 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
395 | 0 | CHK_(ptr); |
396 | 0 | ctx->SetLastTag(tag); |
397 | 0 | goto message_done; |
398 | 0 | } |
399 | 0 | ptr = UnknownFieldParse( |
400 | 0 | tag, |
401 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
402 | 0 | ptr, ctx); |
403 | 0 | CHK_(ptr != nullptr); |
404 | 0 | } // while |
405 | 0 | message_done: |
406 | 0 | _impl_._has_bits_.Or(has_bits); |
407 | 0 | return ptr; |
408 | 0 | failure: |
409 | 0 | ptr = nullptr; |
410 | 0 | goto message_done; |
411 | 0 | #undef CHK_ |
412 | 0 | } |
413 | | |
414 | | uint8_t* IHDR::_InternalSerialize( |
415 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
416 | | // @@protoc_insertion_point(serialize_to_array_start:IHDR) |
417 | 0 | uint32_t cached_has_bits = 0; |
418 | 0 | (void) cached_has_bits; |
419 | |
|
420 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
421 | | // required uint32 width = 1; |
422 | 0 | if (cached_has_bits & 0x00000001u) { |
423 | 0 | target = stream->EnsureSpace(target); |
424 | 0 | target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_width(), target); |
425 | 0 | } |
426 | | |
427 | | // required uint32 height = 2; |
428 | 0 | if (cached_has_bits & 0x00000002u) { |
429 | 0 | target = stream->EnsureSpace(target); |
430 | 0 | target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_height(), target); |
431 | 0 | } |
432 | | |
433 | | // required uint32 other1 = 3; |
434 | 0 | if (cached_has_bits & 0x00000004u) { |
435 | 0 | target = stream->EnsureSpace(target); |
436 | 0 | target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_other1(), target); |
437 | 0 | } |
438 | | |
439 | | // required uint32 other2 = 4; |
440 | 0 | if (cached_has_bits & 0x00000008u) { |
441 | 0 | target = stream->EnsureSpace(target); |
442 | 0 | target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_other2(), target); |
443 | 0 | } |
444 | |
|
445 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
446 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
447 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
448 | 0 | } |
449 | | // @@protoc_insertion_point(serialize_to_array_end:IHDR) |
450 | 0 | return target; |
451 | 0 | } |
452 | | |
453 | 0 | size_t IHDR::RequiredFieldsByteSizeFallback() const { |
454 | | // @@protoc_insertion_point(required_fields_byte_size_fallback_start:IHDR) |
455 | 0 | size_t total_size = 0; |
456 | |
|
457 | 0 | if (_internal_has_width()) { |
458 | | // required uint32 width = 1; |
459 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_width()); |
460 | 0 | } |
461 | |
|
462 | 0 | if (_internal_has_height()) { |
463 | | // required uint32 height = 2; |
464 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_height()); |
465 | 0 | } |
466 | |
|
467 | 0 | if (_internal_has_other1()) { |
468 | | // required uint32 other1 = 3; |
469 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_other1()); |
470 | 0 | } |
471 | |
|
472 | 0 | if (_internal_has_other2()) { |
473 | | // required uint32 other2 = 4; |
474 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_other2()); |
475 | 0 | } |
476 | |
|
477 | 0 | return total_size; |
478 | 0 | } |
479 | 0 | size_t IHDR::ByteSizeLong() const { |
480 | | // @@protoc_insertion_point(message_byte_size_start:IHDR) |
481 | 0 | size_t total_size = 0; |
482 | |
|
483 | 0 | if (((_impl_._has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) { // All required fields are present. |
484 | | // required uint32 width = 1; |
485 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_width()); |
486 | | |
487 | | // required uint32 height = 2; |
488 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_height()); |
489 | | |
490 | | // required uint32 other1 = 3; |
491 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_other1()); |
492 | | |
493 | | // required uint32 other2 = 4; |
494 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_other2()); |
495 | |
|
496 | 0 | } else { |
497 | 0 | total_size += RequiredFieldsByteSizeFallback(); |
498 | 0 | } |
499 | 0 | uint32_t cached_has_bits = 0; |
500 | | // Prevent compiler warnings about cached_has_bits being unused |
501 | 0 | (void) cached_has_bits; |
502 | |
|
503 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
504 | 0 | } |
505 | | |
506 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData IHDR::_class_data_ = { |
507 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
508 | | IHDR::MergeImpl |
509 | | }; |
510 | 9 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*IHDR::GetClassData() const { return &_class_data_; } |
511 | | |
512 | | |
513 | 3 | void IHDR::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
514 | 3 | auto* const _this = static_cast<IHDR*>(&to_msg); |
515 | 3 | auto& from = static_cast<const IHDR&>(from_msg); |
516 | | // @@protoc_insertion_point(class_specific_merge_from_start:IHDR) |
517 | 3 | GOOGLE_DCHECK_NE(&from, _this); |
518 | 3 | uint32_t cached_has_bits = 0; |
519 | 3 | (void) cached_has_bits; |
520 | | |
521 | 3 | cached_has_bits = from._impl_._has_bits_[0]; |
522 | 3 | if (cached_has_bits & 0x0000000fu) { |
523 | 0 | if (cached_has_bits & 0x00000001u) { |
524 | 0 | _this->_impl_.width_ = from._impl_.width_; |
525 | 0 | } |
526 | 0 | if (cached_has_bits & 0x00000002u) { |
527 | 0 | _this->_impl_.height_ = from._impl_.height_; |
528 | 0 | } |
529 | 0 | if (cached_has_bits & 0x00000004u) { |
530 | 0 | _this->_impl_.other1_ = from._impl_.other1_; |
531 | 0 | } |
532 | 0 | if (cached_has_bits & 0x00000008u) { |
533 | 0 | _this->_impl_.other2_ = from._impl_.other2_; |
534 | 0 | } |
535 | 0 | _this->_impl_._has_bits_[0] |= cached_has_bits; |
536 | 0 | } |
537 | 3 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
538 | 3 | } |
539 | | |
540 | 0 | void IHDR::CopyFrom(const IHDR& from) { |
541 | | // @@protoc_insertion_point(class_specific_copy_from_start:IHDR) |
542 | 0 | if (&from == this) return; |
543 | 0 | Clear(); |
544 | 0 | MergeFrom(from); |
545 | 0 | } |
546 | | |
547 | 0 | bool IHDR::IsInitialized() const { |
548 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
549 | 0 | return true; |
550 | 0 | } |
551 | | |
552 | 0 | void IHDR::InternalSwap(IHDR* other) { |
553 | 0 | using std::swap; |
554 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
555 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
556 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
557 | 0 | PROTOBUF_FIELD_OFFSET(IHDR, _impl_.other2_) |
558 | 0 | + sizeof(IHDR::_impl_.other2_) |
559 | 0 | - PROTOBUF_FIELD_OFFSET(IHDR, _impl_.width_)>( |
560 | 0 | reinterpret_cast<char*>(&_impl_.width_), |
561 | 0 | reinterpret_cast<char*>(&other->_impl_.width_)); |
562 | 0 | } |
563 | | |
564 | 327k | ::PROTOBUF_NAMESPACE_ID::Metadata IHDR::GetMetadata() const { |
565 | 327k | return ::_pbi::AssignDescriptors( |
566 | 327k | &descriptor_table_png_5ffuzz_5fproto_2eproto_getter, &descriptor_table_png_5ffuzz_5fproto_2eproto_once, |
567 | 327k | file_level_metadata_png_5ffuzz_5fproto_2eproto[0]); |
568 | 327k | } |
569 | | |
570 | | // =================================================================== |
571 | | |
572 | | class PLTE::_Internal { |
573 | | public: |
574 | | using HasBits = decltype(std::declval<PLTE>()._impl_._has_bits_); |
575 | 0 | static void set_has_data(HasBits* has_bits) { |
576 | 0 | (*has_bits)[0] |= 1u; |
577 | 0 | } |
578 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
579 | 0 | return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; |
580 | 0 | } |
581 | | }; |
582 | | |
583 | | PLTE::PLTE(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
584 | | bool is_message_owned) |
585 | 3.01k | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
586 | 3.01k | SharedCtor(arena, is_message_owned); |
587 | | // @@protoc_insertion_point(arena_constructor:PLTE) |
588 | 3.01k | } |
589 | | PLTE::PLTE(const PLTE& from) |
590 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
591 | 0 | PLTE* const _this = this; (void)_this; |
592 | 0 | new (&_impl_) Impl_{ |
593 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
594 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
595 | 0 | , decltype(_impl_.data_){}}; |
596 | |
|
597 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
598 | 0 | _impl_.data_.InitDefault(); |
599 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
600 | | _impl_.data_.Set("", GetArenaForAllocation()); |
601 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
602 | 0 | if (from._internal_has_data()) { |
603 | 0 | _this->_impl_.data_.Set(from._internal_data(), |
604 | 0 | _this->GetArenaForAllocation()); |
605 | 0 | } |
606 | | // @@protoc_insertion_point(copy_constructor:PLTE) |
607 | 0 | } |
608 | | |
609 | | inline void PLTE::SharedCtor( |
610 | 3.01k | ::_pb::Arena* arena, bool is_message_owned) { |
611 | 3.01k | (void)arena; |
612 | 3.01k | (void)is_message_owned; |
613 | 3.01k | new (&_impl_) Impl_{ |
614 | 3.01k | decltype(_impl_._has_bits_){} |
615 | 3.01k | , /*decltype(_impl_._cached_size_)*/{} |
616 | 3.01k | , decltype(_impl_.data_){} |
617 | 3.01k | }; |
618 | 3.01k | _impl_.data_.InitDefault(); |
619 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
620 | | _impl_.data_.Set("", GetArenaForAllocation()); |
621 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
622 | 3.01k | } |
623 | | |
624 | 3.01k | PLTE::~PLTE() { |
625 | | // @@protoc_insertion_point(destructor:PLTE) |
626 | 3.01k | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
627 | 0 | (void)arena; |
628 | 0 | return; |
629 | 0 | } |
630 | 3.01k | SharedDtor(); |
631 | 3.01k | } |
632 | | |
633 | 3.01k | inline void PLTE::SharedDtor() { |
634 | 3.01k | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
635 | 3.01k | _impl_.data_.Destroy(); |
636 | 3.01k | } |
637 | | |
638 | 0 | void PLTE::SetCachedSize(int size) const { |
639 | 0 | _impl_._cached_size_.Set(size); |
640 | 0 | } |
641 | | |
642 | 0 | void PLTE::Clear() { |
643 | | // @@protoc_insertion_point(message_clear_start:PLTE) |
644 | 0 | uint32_t cached_has_bits = 0; |
645 | | // Prevent compiler warnings about cached_has_bits being unused |
646 | 0 | (void) cached_has_bits; |
647 | |
|
648 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
649 | 0 | if (cached_has_bits & 0x00000001u) { |
650 | 0 | _impl_.data_.ClearNonDefaultToEmpty(); |
651 | 0 | } |
652 | 0 | _impl_._has_bits_.Clear(); |
653 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
654 | 0 | } |
655 | | |
656 | 0 | const char* PLTE::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
657 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
658 | 0 | _Internal::HasBits has_bits{}; |
659 | 0 | while (!ctx->Done(&ptr)) { |
660 | 0 | uint32_t tag; |
661 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
662 | 0 | switch (tag >> 3) { |
663 | | // required bytes data = 1; |
664 | 0 | case 1: |
665 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
666 | 0 | auto str = _internal_mutable_data(); |
667 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
668 | 0 | CHK_(ptr); |
669 | 0 | } else |
670 | 0 | goto handle_unusual; |
671 | 0 | continue; |
672 | 0 | default: |
673 | 0 | goto handle_unusual; |
674 | 0 | } // switch |
675 | 0 | handle_unusual: |
676 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
677 | 0 | CHK_(ptr); |
678 | 0 | ctx->SetLastTag(tag); |
679 | 0 | goto message_done; |
680 | 0 | } |
681 | 0 | ptr = UnknownFieldParse( |
682 | 0 | tag, |
683 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
684 | 0 | ptr, ctx); |
685 | 0 | CHK_(ptr != nullptr); |
686 | 0 | } // while |
687 | 0 | message_done: |
688 | 0 | _impl_._has_bits_.Or(has_bits); |
689 | 0 | return ptr; |
690 | 0 | failure: |
691 | 0 | ptr = nullptr; |
692 | 0 | goto message_done; |
693 | 0 | #undef CHK_ |
694 | 0 | } |
695 | | |
696 | | uint8_t* PLTE::_InternalSerialize( |
697 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
698 | | // @@protoc_insertion_point(serialize_to_array_start:PLTE) |
699 | 0 | uint32_t cached_has_bits = 0; |
700 | 0 | (void) cached_has_bits; |
701 | |
|
702 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
703 | | // required bytes data = 1; |
704 | 0 | if (cached_has_bits & 0x00000001u) { |
705 | 0 | target = stream->WriteBytesMaybeAliased( |
706 | 0 | 1, this->_internal_data(), target); |
707 | 0 | } |
708 | |
|
709 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
710 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
711 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
712 | 0 | } |
713 | | // @@protoc_insertion_point(serialize_to_array_end:PLTE) |
714 | 0 | return target; |
715 | 0 | } |
716 | | |
717 | 0 | size_t PLTE::ByteSizeLong() const { |
718 | | // @@protoc_insertion_point(message_byte_size_start:PLTE) |
719 | 0 | size_t total_size = 0; |
720 | | |
721 | | // required bytes data = 1; |
722 | 0 | if (_internal_has_data()) { |
723 | 0 | total_size += 1 + |
724 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
725 | 0 | this->_internal_data()); |
726 | 0 | } |
727 | 0 | uint32_t cached_has_bits = 0; |
728 | | // Prevent compiler warnings about cached_has_bits being unused |
729 | 0 | (void) cached_has_bits; |
730 | |
|
731 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
732 | 0 | } |
733 | | |
734 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PLTE::_class_data_ = { |
735 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
736 | | PLTE::MergeImpl |
737 | | }; |
738 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PLTE::GetClassData() const { return &_class_data_; } |
739 | | |
740 | | |
741 | 0 | void PLTE::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
742 | 0 | auto* const _this = static_cast<PLTE*>(&to_msg); |
743 | 0 | auto& from = static_cast<const PLTE&>(from_msg); |
744 | | // @@protoc_insertion_point(class_specific_merge_from_start:PLTE) |
745 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
746 | 0 | uint32_t cached_has_bits = 0; |
747 | 0 | (void) cached_has_bits; |
748 | |
|
749 | 0 | if (from._internal_has_data()) { |
750 | 0 | _this->_internal_set_data(from._internal_data()); |
751 | 0 | } |
752 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
753 | 0 | } |
754 | | |
755 | 0 | void PLTE::CopyFrom(const PLTE& from) { |
756 | | // @@protoc_insertion_point(class_specific_copy_from_start:PLTE) |
757 | 0 | if (&from == this) return; |
758 | 0 | Clear(); |
759 | 0 | MergeFrom(from); |
760 | 0 | } |
761 | | |
762 | 0 | bool PLTE::IsInitialized() const { |
763 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
764 | 0 | return true; |
765 | 0 | } |
766 | | |
767 | 0 | void PLTE::InternalSwap(PLTE* other) { |
768 | 0 | using std::swap; |
769 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
770 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
771 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
772 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
773 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
774 | 0 | &_impl_.data_, lhs_arena, |
775 | 0 | &other->_impl_.data_, rhs_arena |
776 | 0 | ); |
777 | 0 | } |
778 | | |
779 | 27.1k | ::PROTOBUF_NAMESPACE_ID::Metadata PLTE::GetMetadata() const { |
780 | 27.1k | return ::_pbi::AssignDescriptors( |
781 | 27.1k | &descriptor_table_png_5ffuzz_5fproto_2eproto_getter, &descriptor_table_png_5ffuzz_5fproto_2eproto_once, |
782 | 27.1k | file_level_metadata_png_5ffuzz_5fproto_2eproto[1]); |
783 | 27.1k | } |
784 | | |
785 | | // =================================================================== |
786 | | |
787 | | class IDAT::_Internal { |
788 | | public: |
789 | | using HasBits = decltype(std::declval<IDAT>()._impl_._has_bits_); |
790 | 0 | static void set_has_data(HasBits* has_bits) { |
791 | 0 | (*has_bits)[0] |= 1u; |
792 | 0 | } |
793 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
794 | 0 | return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; |
795 | 0 | } |
796 | | }; |
797 | | |
798 | | IDAT::IDAT(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
799 | | bool is_message_owned) |
800 | 6.38k | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
801 | 6.38k | SharedCtor(arena, is_message_owned); |
802 | | // @@protoc_insertion_point(arena_constructor:IDAT) |
803 | 6.38k | } |
804 | | IDAT::IDAT(const IDAT& from) |
805 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
806 | 0 | IDAT* const _this = this; (void)_this; |
807 | 0 | new (&_impl_) Impl_{ |
808 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
809 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
810 | 0 | , decltype(_impl_.data_){}}; |
811 | |
|
812 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
813 | 0 | _impl_.data_.InitDefault(); |
814 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
815 | | _impl_.data_.Set("", GetArenaForAllocation()); |
816 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
817 | 0 | if (from._internal_has_data()) { |
818 | 0 | _this->_impl_.data_.Set(from._internal_data(), |
819 | 0 | _this->GetArenaForAllocation()); |
820 | 0 | } |
821 | | // @@protoc_insertion_point(copy_constructor:IDAT) |
822 | 0 | } |
823 | | |
824 | | inline void IDAT::SharedCtor( |
825 | 6.38k | ::_pb::Arena* arena, bool is_message_owned) { |
826 | 6.38k | (void)arena; |
827 | 6.38k | (void)is_message_owned; |
828 | 6.38k | new (&_impl_) Impl_{ |
829 | 6.38k | decltype(_impl_._has_bits_){} |
830 | 6.38k | , /*decltype(_impl_._cached_size_)*/{} |
831 | 6.38k | , decltype(_impl_.data_){} |
832 | 6.38k | }; |
833 | 6.38k | _impl_.data_.InitDefault(); |
834 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
835 | | _impl_.data_.Set("", GetArenaForAllocation()); |
836 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
837 | 6.38k | } |
838 | | |
839 | 6.38k | IDAT::~IDAT() { |
840 | | // @@protoc_insertion_point(destructor:IDAT) |
841 | 6.38k | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
842 | 0 | (void)arena; |
843 | 0 | return; |
844 | 0 | } |
845 | 6.38k | SharedDtor(); |
846 | 6.38k | } |
847 | | |
848 | 6.38k | inline void IDAT::SharedDtor() { |
849 | 6.38k | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
850 | 6.38k | _impl_.data_.Destroy(); |
851 | 6.38k | } |
852 | | |
853 | 0 | void IDAT::SetCachedSize(int size) const { |
854 | 0 | _impl_._cached_size_.Set(size); |
855 | 0 | } |
856 | | |
857 | 0 | void IDAT::Clear() { |
858 | | // @@protoc_insertion_point(message_clear_start:IDAT) |
859 | 0 | uint32_t cached_has_bits = 0; |
860 | | // Prevent compiler warnings about cached_has_bits being unused |
861 | 0 | (void) cached_has_bits; |
862 | |
|
863 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
864 | 0 | if (cached_has_bits & 0x00000001u) { |
865 | 0 | _impl_.data_.ClearNonDefaultToEmpty(); |
866 | 0 | } |
867 | 0 | _impl_._has_bits_.Clear(); |
868 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
869 | 0 | } |
870 | | |
871 | 0 | const char* IDAT::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
872 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
873 | 0 | _Internal::HasBits has_bits{}; |
874 | 0 | while (!ctx->Done(&ptr)) { |
875 | 0 | uint32_t tag; |
876 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
877 | 0 | switch (tag >> 3) { |
878 | | // required bytes data = 1; |
879 | 0 | case 1: |
880 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
881 | 0 | auto str = _internal_mutable_data(); |
882 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
883 | 0 | CHK_(ptr); |
884 | 0 | } else |
885 | 0 | goto handle_unusual; |
886 | 0 | continue; |
887 | 0 | default: |
888 | 0 | goto handle_unusual; |
889 | 0 | } // switch |
890 | 0 | handle_unusual: |
891 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
892 | 0 | CHK_(ptr); |
893 | 0 | ctx->SetLastTag(tag); |
894 | 0 | goto message_done; |
895 | 0 | } |
896 | 0 | ptr = UnknownFieldParse( |
897 | 0 | tag, |
898 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
899 | 0 | ptr, ctx); |
900 | 0 | CHK_(ptr != nullptr); |
901 | 0 | } // while |
902 | 0 | message_done: |
903 | 0 | _impl_._has_bits_.Or(has_bits); |
904 | 0 | return ptr; |
905 | 0 | failure: |
906 | 0 | ptr = nullptr; |
907 | 0 | goto message_done; |
908 | 0 | #undef CHK_ |
909 | 0 | } |
910 | | |
911 | | uint8_t* IDAT::_InternalSerialize( |
912 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
913 | | // @@protoc_insertion_point(serialize_to_array_start:IDAT) |
914 | 0 | uint32_t cached_has_bits = 0; |
915 | 0 | (void) cached_has_bits; |
916 | |
|
917 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
918 | | // required bytes data = 1; |
919 | 0 | if (cached_has_bits & 0x00000001u) { |
920 | 0 | target = stream->WriteBytesMaybeAliased( |
921 | 0 | 1, this->_internal_data(), target); |
922 | 0 | } |
923 | |
|
924 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
925 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
926 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
927 | 0 | } |
928 | | // @@protoc_insertion_point(serialize_to_array_end:IDAT) |
929 | 0 | return target; |
930 | 0 | } |
931 | | |
932 | 0 | size_t IDAT::ByteSizeLong() const { |
933 | | // @@protoc_insertion_point(message_byte_size_start:IDAT) |
934 | 0 | size_t total_size = 0; |
935 | | |
936 | | // required bytes data = 1; |
937 | 0 | if (_internal_has_data()) { |
938 | 0 | total_size += 1 + |
939 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
940 | 0 | this->_internal_data()); |
941 | 0 | } |
942 | 0 | uint32_t cached_has_bits = 0; |
943 | | // Prevent compiler warnings about cached_has_bits being unused |
944 | 0 | (void) cached_has_bits; |
945 | |
|
946 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
947 | 0 | } |
948 | | |
949 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData IDAT::_class_data_ = { |
950 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
951 | | IDAT::MergeImpl |
952 | | }; |
953 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*IDAT::GetClassData() const { return &_class_data_; } |
954 | | |
955 | | |
956 | 0 | void IDAT::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
957 | 0 | auto* const _this = static_cast<IDAT*>(&to_msg); |
958 | 0 | auto& from = static_cast<const IDAT&>(from_msg); |
959 | | // @@protoc_insertion_point(class_specific_merge_from_start:IDAT) |
960 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
961 | 0 | uint32_t cached_has_bits = 0; |
962 | 0 | (void) cached_has_bits; |
963 | |
|
964 | 0 | if (from._internal_has_data()) { |
965 | 0 | _this->_internal_set_data(from._internal_data()); |
966 | 0 | } |
967 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
968 | 0 | } |
969 | | |
970 | 0 | void IDAT::CopyFrom(const IDAT& from) { |
971 | | // @@protoc_insertion_point(class_specific_copy_from_start:IDAT) |
972 | 0 | if (&from == this) return; |
973 | 0 | Clear(); |
974 | 0 | MergeFrom(from); |
975 | 0 | } |
976 | | |
977 | 0 | bool IDAT::IsInitialized() const { |
978 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
979 | 0 | return true; |
980 | 0 | } |
981 | | |
982 | 0 | void IDAT::InternalSwap(IDAT* other) { |
983 | 0 | using std::swap; |
984 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
985 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
986 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
987 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
988 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
989 | 0 | &_impl_.data_, lhs_arena, |
990 | 0 | &other->_impl_.data_, rhs_arena |
991 | 0 | ); |
992 | 0 | } |
993 | | |
994 | 57.4k | ::PROTOBUF_NAMESPACE_ID::Metadata IDAT::GetMetadata() const { |
995 | 57.4k | return ::_pbi::AssignDescriptors( |
996 | 57.4k | &descriptor_table_png_5ffuzz_5fproto_2eproto_getter, &descriptor_table_png_5ffuzz_5fproto_2eproto_once, |
997 | 57.4k | file_level_metadata_png_5ffuzz_5fproto_2eproto[2]); |
998 | 57.4k | } |
999 | | |
1000 | | // =================================================================== |
1001 | | |
1002 | | class iCCP::_Internal { |
1003 | | public: |
1004 | | using HasBits = decltype(std::declval<iCCP>()._impl_._has_bits_); |
1005 | 0 | static void set_has_data(HasBits* has_bits) { |
1006 | 0 | (*has_bits)[0] |= 1u; |
1007 | 0 | } |
1008 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
1009 | 0 | return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; |
1010 | 0 | } |
1011 | | }; |
1012 | | |
1013 | | iCCP::iCCP(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
1014 | | bool is_message_owned) |
1015 | 11.9k | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
1016 | 11.9k | SharedCtor(arena, is_message_owned); |
1017 | | // @@protoc_insertion_point(arena_constructor:iCCP) |
1018 | 11.9k | } |
1019 | | iCCP::iCCP(const iCCP& from) |
1020 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
1021 | 0 | iCCP* const _this = this; (void)_this; |
1022 | 0 | new (&_impl_) Impl_{ |
1023 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
1024 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
1025 | 0 | , decltype(_impl_.data_){}}; |
1026 | |
|
1027 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1028 | 0 | _impl_.data_.InitDefault(); |
1029 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1030 | | _impl_.data_.Set("", GetArenaForAllocation()); |
1031 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1032 | 0 | if (from._internal_has_data()) { |
1033 | 0 | _this->_impl_.data_.Set(from._internal_data(), |
1034 | 0 | _this->GetArenaForAllocation()); |
1035 | 0 | } |
1036 | | // @@protoc_insertion_point(copy_constructor:iCCP) |
1037 | 0 | } |
1038 | | |
1039 | | inline void iCCP::SharedCtor( |
1040 | 11.9k | ::_pb::Arena* arena, bool is_message_owned) { |
1041 | 11.9k | (void)arena; |
1042 | 11.9k | (void)is_message_owned; |
1043 | 11.9k | new (&_impl_) Impl_{ |
1044 | 11.9k | decltype(_impl_._has_bits_){} |
1045 | 11.9k | , /*decltype(_impl_._cached_size_)*/{} |
1046 | 11.9k | , decltype(_impl_.data_){} |
1047 | 11.9k | }; |
1048 | 11.9k | _impl_.data_.InitDefault(); |
1049 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1050 | | _impl_.data_.Set("", GetArenaForAllocation()); |
1051 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1052 | 11.9k | } |
1053 | | |
1054 | 11.9k | iCCP::~iCCP() { |
1055 | | // @@protoc_insertion_point(destructor:iCCP) |
1056 | 11.9k | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
1057 | 0 | (void)arena; |
1058 | 0 | return; |
1059 | 0 | } |
1060 | 11.9k | SharedDtor(); |
1061 | 11.9k | } |
1062 | | |
1063 | 11.9k | inline void iCCP::SharedDtor() { |
1064 | 11.9k | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
1065 | 11.9k | _impl_.data_.Destroy(); |
1066 | 11.9k | } |
1067 | | |
1068 | 0 | void iCCP::SetCachedSize(int size) const { |
1069 | 0 | _impl_._cached_size_.Set(size); |
1070 | 0 | } |
1071 | | |
1072 | 0 | void iCCP::Clear() { |
1073 | | // @@protoc_insertion_point(message_clear_start:iCCP) |
1074 | 0 | uint32_t cached_has_bits = 0; |
1075 | | // Prevent compiler warnings about cached_has_bits being unused |
1076 | 0 | (void) cached_has_bits; |
1077 | |
|
1078 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1079 | 0 | if (cached_has_bits & 0x00000001u) { |
1080 | 0 | _impl_.data_.ClearNonDefaultToEmpty(); |
1081 | 0 | } |
1082 | 0 | _impl_._has_bits_.Clear(); |
1083 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
1084 | 0 | } |
1085 | | |
1086 | 0 | const char* iCCP::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
1087 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1088 | 0 | _Internal::HasBits has_bits{}; |
1089 | 0 | while (!ctx->Done(&ptr)) { |
1090 | 0 | uint32_t tag; |
1091 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
1092 | 0 | switch (tag >> 3) { |
1093 | | // required bytes data = 2; |
1094 | 0 | case 2: |
1095 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { |
1096 | 0 | auto str = _internal_mutable_data(); |
1097 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
1098 | 0 | CHK_(ptr); |
1099 | 0 | } else |
1100 | 0 | goto handle_unusual; |
1101 | 0 | continue; |
1102 | 0 | default: |
1103 | 0 | goto handle_unusual; |
1104 | 0 | } // switch |
1105 | 0 | handle_unusual: |
1106 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
1107 | 0 | CHK_(ptr); |
1108 | 0 | ctx->SetLastTag(tag); |
1109 | 0 | goto message_done; |
1110 | 0 | } |
1111 | 0 | ptr = UnknownFieldParse( |
1112 | 0 | tag, |
1113 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
1114 | 0 | ptr, ctx); |
1115 | 0 | CHK_(ptr != nullptr); |
1116 | 0 | } // while |
1117 | 0 | message_done: |
1118 | 0 | _impl_._has_bits_.Or(has_bits); |
1119 | 0 | return ptr; |
1120 | 0 | failure: |
1121 | 0 | ptr = nullptr; |
1122 | 0 | goto message_done; |
1123 | 0 | #undef CHK_ |
1124 | 0 | } |
1125 | | |
1126 | | uint8_t* iCCP::_InternalSerialize( |
1127 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
1128 | | // @@protoc_insertion_point(serialize_to_array_start:iCCP) |
1129 | 0 | uint32_t cached_has_bits = 0; |
1130 | 0 | (void) cached_has_bits; |
1131 | |
|
1132 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1133 | | // required bytes data = 2; |
1134 | 0 | if (cached_has_bits & 0x00000001u) { |
1135 | 0 | target = stream->WriteBytesMaybeAliased( |
1136 | 0 | 2, this->_internal_data(), target); |
1137 | 0 | } |
1138 | |
|
1139 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1140 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
1141 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
1142 | 0 | } |
1143 | | // @@protoc_insertion_point(serialize_to_array_end:iCCP) |
1144 | 0 | return target; |
1145 | 0 | } |
1146 | | |
1147 | 0 | size_t iCCP::ByteSizeLong() const { |
1148 | | // @@protoc_insertion_point(message_byte_size_start:iCCP) |
1149 | 0 | size_t total_size = 0; |
1150 | | |
1151 | | // required bytes data = 2; |
1152 | 0 | if (_internal_has_data()) { |
1153 | 0 | total_size += 1 + |
1154 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
1155 | 0 | this->_internal_data()); |
1156 | 0 | } |
1157 | 0 | uint32_t cached_has_bits = 0; |
1158 | | // Prevent compiler warnings about cached_has_bits being unused |
1159 | 0 | (void) cached_has_bits; |
1160 | |
|
1161 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
1162 | 0 | } |
1163 | | |
1164 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData iCCP::_class_data_ = { |
1165 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
1166 | | iCCP::MergeImpl |
1167 | | }; |
1168 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*iCCP::GetClassData() const { return &_class_data_; } |
1169 | | |
1170 | | |
1171 | 0 | void iCCP::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
1172 | 0 | auto* const _this = static_cast<iCCP*>(&to_msg); |
1173 | 0 | auto& from = static_cast<const iCCP&>(from_msg); |
1174 | | // @@protoc_insertion_point(class_specific_merge_from_start:iCCP) |
1175 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
1176 | 0 | uint32_t cached_has_bits = 0; |
1177 | 0 | (void) cached_has_bits; |
1178 | |
|
1179 | 0 | if (from._internal_has_data()) { |
1180 | 0 | _this->_internal_set_data(from._internal_data()); |
1181 | 0 | } |
1182 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1183 | 0 | } |
1184 | | |
1185 | 0 | void iCCP::CopyFrom(const iCCP& from) { |
1186 | | // @@protoc_insertion_point(class_specific_copy_from_start:iCCP) |
1187 | 0 | if (&from == this) return; |
1188 | 0 | Clear(); |
1189 | 0 | MergeFrom(from); |
1190 | 0 | } |
1191 | | |
1192 | 0 | bool iCCP::IsInitialized() const { |
1193 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
1194 | 0 | return true; |
1195 | 0 | } |
1196 | | |
1197 | 0 | void iCCP::InternalSwap(iCCP* other) { |
1198 | 0 | using std::swap; |
1199 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
1200 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
1201 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
1202 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
1203 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
1204 | 0 | &_impl_.data_, lhs_arena, |
1205 | 0 | &other->_impl_.data_, rhs_arena |
1206 | 0 | ); |
1207 | 0 | } |
1208 | | |
1209 | 107k | ::PROTOBUF_NAMESPACE_ID::Metadata iCCP::GetMetadata() const { |
1210 | 107k | return ::_pbi::AssignDescriptors( |
1211 | 107k | &descriptor_table_png_5ffuzz_5fproto_2eproto_getter, &descriptor_table_png_5ffuzz_5fproto_2eproto_once, |
1212 | 107k | file_level_metadata_png_5ffuzz_5fproto_2eproto[3]); |
1213 | 107k | } |
1214 | | |
1215 | | // =================================================================== |
1216 | | |
1217 | | class OtherChunk::_Internal { |
1218 | | public: |
1219 | | using HasBits = decltype(std::declval<OtherChunk>()._impl_._has_bits_); |
1220 | 0 | static void set_has_data(HasBits* has_bits) { |
1221 | 0 | (*has_bits)[0] |= 1u; |
1222 | 0 | } |
1223 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
1224 | 0 | return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; |
1225 | 0 | } |
1226 | | }; |
1227 | | |
1228 | | OtherChunk::OtherChunk(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
1229 | | bool is_message_owned) |
1230 | 66.1k | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
1231 | 66.1k | SharedCtor(arena, is_message_owned); |
1232 | | // @@protoc_insertion_point(arena_constructor:OtherChunk) |
1233 | 66.1k | } |
1234 | | OtherChunk::OtherChunk(const OtherChunk& from) |
1235 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
1236 | 0 | OtherChunk* const _this = this; (void)_this; |
1237 | 0 | new (&_impl_) Impl_{ |
1238 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
1239 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
1240 | 0 | , decltype(_impl_.data_){} |
1241 | 0 | , decltype(_impl_.type_){} |
1242 | 0 | , /*decltype(_impl_._oneof_case_)*/{}}; |
1243 | |
|
1244 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1245 | 0 | _impl_.data_.InitDefault(); |
1246 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1247 | | _impl_.data_.Set("", GetArenaForAllocation()); |
1248 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1249 | 0 | if (from._internal_has_data()) { |
1250 | 0 | _this->_impl_.data_.Set(from._internal_data(), |
1251 | 0 | _this->GetArenaForAllocation()); |
1252 | 0 | } |
1253 | 0 | clear_has_type(); |
1254 | 0 | switch (from.type_case()) { |
1255 | 0 | case kKnownType: { |
1256 | 0 | _this->_internal_set_known_type(from._internal_known_type()); |
1257 | 0 | break; |
1258 | 0 | } |
1259 | 0 | case kUnknownType: { |
1260 | 0 | _this->_internal_set_unknown_type(from._internal_unknown_type()); |
1261 | 0 | break; |
1262 | 0 | } |
1263 | 0 | case TYPE_NOT_SET: { |
1264 | 0 | break; |
1265 | 0 | } |
1266 | 0 | } |
1267 | | // @@protoc_insertion_point(copy_constructor:OtherChunk) |
1268 | 0 | } |
1269 | | |
1270 | | inline void OtherChunk::SharedCtor( |
1271 | 66.1k | ::_pb::Arena* arena, bool is_message_owned) { |
1272 | 66.1k | (void)arena; |
1273 | 66.1k | (void)is_message_owned; |
1274 | 66.1k | new (&_impl_) Impl_{ |
1275 | 66.1k | decltype(_impl_._has_bits_){} |
1276 | 66.1k | , /*decltype(_impl_._cached_size_)*/{} |
1277 | 66.1k | , decltype(_impl_.data_){} |
1278 | 66.1k | , decltype(_impl_.type_){} |
1279 | 66.1k | , /*decltype(_impl_._oneof_case_)*/{} |
1280 | 66.1k | }; |
1281 | 66.1k | _impl_.data_.InitDefault(); |
1282 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1283 | | _impl_.data_.Set("", GetArenaForAllocation()); |
1284 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
1285 | 66.1k | clear_has_type(); |
1286 | 66.1k | } |
1287 | | |
1288 | 66.1k | OtherChunk::~OtherChunk() { |
1289 | | // @@protoc_insertion_point(destructor:OtherChunk) |
1290 | 66.1k | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
1291 | 0 | (void)arena; |
1292 | 0 | return; |
1293 | 0 | } |
1294 | 66.1k | SharedDtor(); |
1295 | 66.1k | } |
1296 | | |
1297 | 66.1k | inline void OtherChunk::SharedDtor() { |
1298 | 66.1k | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
1299 | 66.1k | _impl_.data_.Destroy(); |
1300 | 66.1k | if (has_type()) { |
1301 | 65.6k | clear_type(); |
1302 | 65.6k | } |
1303 | 66.1k | } |
1304 | | |
1305 | 0 | void OtherChunk::SetCachedSize(int size) const { |
1306 | 0 | _impl_._cached_size_.Set(size); |
1307 | 0 | } |
1308 | | |
1309 | 65.6k | void OtherChunk::clear_type() { |
1310 | | // @@protoc_insertion_point(one_of_clear_start:OtherChunk) |
1311 | 65.6k | switch (type_case()) { |
1312 | 62.9k | case kKnownType: { |
1313 | | // No need to clear |
1314 | 62.9k | break; |
1315 | 0 | } |
1316 | 2.73k | case kUnknownType: { |
1317 | | // No need to clear |
1318 | 2.73k | break; |
1319 | 0 | } |
1320 | 0 | case TYPE_NOT_SET: { |
1321 | 0 | break; |
1322 | 0 | } |
1323 | 65.6k | } |
1324 | 65.6k | _impl_._oneof_case_[0] = TYPE_NOT_SET; |
1325 | 65.6k | } |
1326 | | |
1327 | | |
1328 | 0 | void OtherChunk::Clear() { |
1329 | | // @@protoc_insertion_point(message_clear_start:OtherChunk) |
1330 | 0 | uint32_t cached_has_bits = 0; |
1331 | | // Prevent compiler warnings about cached_has_bits being unused |
1332 | 0 | (void) cached_has_bits; |
1333 | |
|
1334 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1335 | 0 | if (cached_has_bits & 0x00000001u) { |
1336 | 0 | _impl_.data_.ClearNonDefaultToEmpty(); |
1337 | 0 | } |
1338 | 0 | clear_type(); |
1339 | 0 | _impl_._has_bits_.Clear(); |
1340 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
1341 | 0 | } |
1342 | | |
1343 | 0 | const char* OtherChunk::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
1344 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1345 | 0 | _Internal::HasBits has_bits{}; |
1346 | 0 | while (!ctx->Done(&ptr)) { |
1347 | 0 | uint32_t tag; |
1348 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
1349 | 0 | switch (tag >> 3) { |
1350 | | // uint32 known_type = 1; |
1351 | 0 | case 1: |
1352 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
1353 | 0 | _internal_set_known_type(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); |
1354 | 0 | CHK_(ptr); |
1355 | 0 | } else |
1356 | 0 | goto handle_unusual; |
1357 | 0 | continue; |
1358 | | // uint32 unknown_type = 2; |
1359 | 0 | case 2: |
1360 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
1361 | 0 | _internal_set_unknown_type(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); |
1362 | 0 | CHK_(ptr); |
1363 | 0 | } else |
1364 | 0 | goto handle_unusual; |
1365 | 0 | continue; |
1366 | | // required bytes data = 3; |
1367 | 0 | case 3: |
1368 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { |
1369 | 0 | auto str = _internal_mutable_data(); |
1370 | 0 | ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); |
1371 | 0 | CHK_(ptr); |
1372 | 0 | } else |
1373 | 0 | goto handle_unusual; |
1374 | 0 | continue; |
1375 | 0 | default: |
1376 | 0 | goto handle_unusual; |
1377 | 0 | } // switch |
1378 | 0 | handle_unusual: |
1379 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
1380 | 0 | CHK_(ptr); |
1381 | 0 | ctx->SetLastTag(tag); |
1382 | 0 | goto message_done; |
1383 | 0 | } |
1384 | 0 | ptr = UnknownFieldParse( |
1385 | 0 | tag, |
1386 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
1387 | 0 | ptr, ctx); |
1388 | 0 | CHK_(ptr != nullptr); |
1389 | 0 | } // while |
1390 | 0 | message_done: |
1391 | 0 | _impl_._has_bits_.Or(has_bits); |
1392 | 0 | return ptr; |
1393 | 0 | failure: |
1394 | 0 | ptr = nullptr; |
1395 | 0 | goto message_done; |
1396 | 0 | #undef CHK_ |
1397 | 0 | } |
1398 | | |
1399 | | uint8_t* OtherChunk::_InternalSerialize( |
1400 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
1401 | | // @@protoc_insertion_point(serialize_to_array_start:OtherChunk) |
1402 | 0 | uint32_t cached_has_bits = 0; |
1403 | 0 | (void) cached_has_bits; |
1404 | |
|
1405 | 0 | switch (type_case()) { |
1406 | 0 | case kKnownType: { |
1407 | 0 | target = stream->EnsureSpace(target); |
1408 | 0 | target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_known_type(), target); |
1409 | 0 | break; |
1410 | 0 | } |
1411 | 0 | case kUnknownType: { |
1412 | 0 | target = stream->EnsureSpace(target); |
1413 | 0 | target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_unknown_type(), target); |
1414 | 0 | break; |
1415 | 0 | } |
1416 | 0 | default: ; |
1417 | 0 | } |
1418 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
1419 | | // required bytes data = 3; |
1420 | 0 | if (cached_has_bits & 0x00000001u) { |
1421 | 0 | target = stream->WriteBytesMaybeAliased( |
1422 | 0 | 3, this->_internal_data(), target); |
1423 | 0 | } |
1424 | |
|
1425 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1426 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
1427 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
1428 | 0 | } |
1429 | | // @@protoc_insertion_point(serialize_to_array_end:OtherChunk) |
1430 | 0 | return target; |
1431 | 0 | } |
1432 | | |
1433 | 0 | size_t OtherChunk::ByteSizeLong() const { |
1434 | | // @@protoc_insertion_point(message_byte_size_start:OtherChunk) |
1435 | 0 | size_t total_size = 0; |
1436 | | |
1437 | | // required bytes data = 3; |
1438 | 0 | if (_internal_has_data()) { |
1439 | 0 | total_size += 1 + |
1440 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
1441 | 0 | this->_internal_data()); |
1442 | 0 | } |
1443 | 0 | uint32_t cached_has_bits = 0; |
1444 | | // Prevent compiler warnings about cached_has_bits being unused |
1445 | 0 | (void) cached_has_bits; |
1446 | |
|
1447 | 0 | switch (type_case()) { |
1448 | | // uint32 known_type = 1; |
1449 | 0 | case kKnownType: { |
1450 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_known_type()); |
1451 | 0 | break; |
1452 | 0 | } |
1453 | | // uint32 unknown_type = 2; |
1454 | 0 | case kUnknownType: { |
1455 | 0 | total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unknown_type()); |
1456 | 0 | break; |
1457 | 0 | } |
1458 | 0 | case TYPE_NOT_SET: { |
1459 | 0 | break; |
1460 | 0 | } |
1461 | 0 | } |
1462 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
1463 | 0 | } |
1464 | | |
1465 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OtherChunk::_class_data_ = { |
1466 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
1467 | | OtherChunk::MergeImpl |
1468 | | }; |
1469 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OtherChunk::GetClassData() const { return &_class_data_; } |
1470 | | |
1471 | | |
1472 | 0 | void OtherChunk::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
1473 | 0 | auto* const _this = static_cast<OtherChunk*>(&to_msg); |
1474 | 0 | auto& from = static_cast<const OtherChunk&>(from_msg); |
1475 | | // @@protoc_insertion_point(class_specific_merge_from_start:OtherChunk) |
1476 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
1477 | 0 | uint32_t cached_has_bits = 0; |
1478 | 0 | (void) cached_has_bits; |
1479 | |
|
1480 | 0 | if (from._internal_has_data()) { |
1481 | 0 | _this->_internal_set_data(from._internal_data()); |
1482 | 0 | } |
1483 | 0 | switch (from.type_case()) { |
1484 | 0 | case kKnownType: { |
1485 | 0 | _this->_internal_set_known_type(from._internal_known_type()); |
1486 | 0 | break; |
1487 | 0 | } |
1488 | 0 | case kUnknownType: { |
1489 | 0 | _this->_internal_set_unknown_type(from._internal_unknown_type()); |
1490 | 0 | break; |
1491 | 0 | } |
1492 | 0 | case TYPE_NOT_SET: { |
1493 | 0 | break; |
1494 | 0 | } |
1495 | 0 | } |
1496 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1497 | 0 | } |
1498 | | |
1499 | 0 | void OtherChunk::CopyFrom(const OtherChunk& from) { |
1500 | | // @@protoc_insertion_point(class_specific_copy_from_start:OtherChunk) |
1501 | 0 | if (&from == this) return; |
1502 | 0 | Clear(); |
1503 | 0 | MergeFrom(from); |
1504 | 0 | } |
1505 | | |
1506 | 0 | bool OtherChunk::IsInitialized() const { |
1507 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
1508 | 0 | return true; |
1509 | 0 | } |
1510 | | |
1511 | 0 | void OtherChunk::InternalSwap(OtherChunk* other) { |
1512 | 0 | using std::swap; |
1513 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
1514 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
1515 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
1516 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
1517 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
1518 | 0 | &_impl_.data_, lhs_arena, |
1519 | 0 | &other->_impl_.data_, rhs_arena |
1520 | 0 | ); |
1521 | 0 | swap(_impl_.type_, other->_impl_.type_); |
1522 | 0 | swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); |
1523 | 0 | } |
1524 | | |
1525 | 792k | ::PROTOBUF_NAMESPACE_ID::Metadata OtherChunk::GetMetadata() const { |
1526 | 792k | return ::_pbi::AssignDescriptors( |
1527 | 792k | &descriptor_table_png_5ffuzz_5fproto_2eproto_getter, &descriptor_table_png_5ffuzz_5fproto_2eproto_once, |
1528 | 792k | file_level_metadata_png_5ffuzz_5fproto_2eproto[4]); |
1529 | 792k | } |
1530 | | |
1531 | | // =================================================================== |
1532 | | |
1533 | | class PngChunk::_Internal { |
1534 | | public: |
1535 | | static const ::PLTE& plte(const PngChunk* msg); |
1536 | | static const ::IDAT& idat(const PngChunk* msg); |
1537 | | static const ::iCCP& iccp(const PngChunk* msg); |
1538 | | static const ::OtherChunk& other_chunk(const PngChunk* msg); |
1539 | | }; |
1540 | | |
1541 | | const ::PLTE& |
1542 | 0 | PngChunk::_Internal::plte(const PngChunk* msg) { |
1543 | 0 | return *msg->_impl_.chunk_.plte_; |
1544 | 0 | } |
1545 | | const ::IDAT& |
1546 | 0 | PngChunk::_Internal::idat(const PngChunk* msg) { |
1547 | 0 | return *msg->_impl_.chunk_.idat_; |
1548 | 0 | } |
1549 | | const ::iCCP& |
1550 | 0 | PngChunk::_Internal::iccp(const PngChunk* msg) { |
1551 | 0 | return *msg->_impl_.chunk_.iccp_; |
1552 | 0 | } |
1553 | | const ::OtherChunk& |
1554 | 0 | PngChunk::_Internal::other_chunk(const PngChunk* msg) { |
1555 | 0 | return *msg->_impl_.chunk_.other_chunk_; |
1556 | 0 | } |
1557 | 0 | void PngChunk::set_allocated_plte(::PLTE* plte) { |
1558 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); |
1559 | 0 | clear_chunk(); |
1560 | 0 | if (plte) { |
1561 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1562 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(plte); |
1563 | 0 | if (message_arena != submessage_arena) { |
1564 | 0 | plte = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1565 | 0 | message_arena, plte, submessage_arena); |
1566 | 0 | } |
1567 | 0 | set_has_plte(); |
1568 | 0 | _impl_.chunk_.plte_ = plte; |
1569 | 0 | } |
1570 | | // @@protoc_insertion_point(field_set_allocated:PngChunk.plte) |
1571 | 0 | } |
1572 | 0 | void PngChunk::set_allocated_idat(::IDAT* idat) { |
1573 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); |
1574 | 0 | clear_chunk(); |
1575 | 0 | if (idat) { |
1576 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1577 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(idat); |
1578 | 0 | if (message_arena != submessage_arena) { |
1579 | 0 | idat = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1580 | 0 | message_arena, idat, submessage_arena); |
1581 | 0 | } |
1582 | 0 | set_has_idat(); |
1583 | 0 | _impl_.chunk_.idat_ = idat; |
1584 | 0 | } |
1585 | | // @@protoc_insertion_point(field_set_allocated:PngChunk.idat) |
1586 | 0 | } |
1587 | 0 | void PngChunk::set_allocated_iccp(::iCCP* iccp) { |
1588 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); |
1589 | 0 | clear_chunk(); |
1590 | 0 | if (iccp) { |
1591 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1592 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(iccp); |
1593 | 0 | if (message_arena != submessage_arena) { |
1594 | 0 | iccp = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1595 | 0 | message_arena, iccp, submessage_arena); |
1596 | 0 | } |
1597 | 0 | set_has_iccp(); |
1598 | 0 | _impl_.chunk_.iccp_ = iccp; |
1599 | 0 | } |
1600 | | // @@protoc_insertion_point(field_set_allocated:PngChunk.iccp) |
1601 | 0 | } |
1602 | 0 | void PngChunk::set_allocated_other_chunk(::OtherChunk* other_chunk) { |
1603 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); |
1604 | 0 | clear_chunk(); |
1605 | 0 | if (other_chunk) { |
1606 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
1607 | 0 | ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(other_chunk); |
1608 | 0 | if (message_arena != submessage_arena) { |
1609 | 0 | other_chunk = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
1610 | 0 | message_arena, other_chunk, submessage_arena); |
1611 | 0 | } |
1612 | 0 | set_has_other_chunk(); |
1613 | 0 | _impl_.chunk_.other_chunk_ = other_chunk; |
1614 | 0 | } |
1615 | | // @@protoc_insertion_point(field_set_allocated:PngChunk.other_chunk) |
1616 | 0 | } |
1617 | | PngChunk::PngChunk(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
1618 | | bool is_message_owned) |
1619 | 96.3k | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
1620 | 96.3k | SharedCtor(arena, is_message_owned); |
1621 | | // @@protoc_insertion_point(arena_constructor:PngChunk) |
1622 | 96.3k | } |
1623 | | PngChunk::PngChunk(const PngChunk& from) |
1624 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
1625 | 0 | PngChunk* const _this = this; (void)_this; |
1626 | 0 | new (&_impl_) Impl_{ |
1627 | 0 | decltype(_impl_.chunk_){} |
1628 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
1629 | 0 | , /*decltype(_impl_._oneof_case_)*/{}}; |
1630 | |
|
1631 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1632 | 0 | clear_has_chunk(); |
1633 | 0 | switch (from.chunk_case()) { |
1634 | 0 | case kPlte: { |
1635 | 0 | _this->_internal_mutable_plte()->::PLTE::MergeFrom( |
1636 | 0 | from._internal_plte()); |
1637 | 0 | break; |
1638 | 0 | } |
1639 | 0 | case kIdat: { |
1640 | 0 | _this->_internal_mutable_idat()->::IDAT::MergeFrom( |
1641 | 0 | from._internal_idat()); |
1642 | 0 | break; |
1643 | 0 | } |
1644 | 0 | case kIccp: { |
1645 | 0 | _this->_internal_mutable_iccp()->::iCCP::MergeFrom( |
1646 | 0 | from._internal_iccp()); |
1647 | 0 | break; |
1648 | 0 | } |
1649 | 0 | case kOtherChunk: { |
1650 | 0 | _this->_internal_mutable_other_chunk()->::OtherChunk::MergeFrom( |
1651 | 0 | from._internal_other_chunk()); |
1652 | 0 | break; |
1653 | 0 | } |
1654 | 0 | case CHUNK_NOT_SET: { |
1655 | 0 | break; |
1656 | 0 | } |
1657 | 0 | } |
1658 | | // @@protoc_insertion_point(copy_constructor:PngChunk) |
1659 | 0 | } |
1660 | | |
1661 | | inline void PngChunk::SharedCtor( |
1662 | 96.3k | ::_pb::Arena* arena, bool is_message_owned) { |
1663 | 96.3k | (void)arena; |
1664 | 96.3k | (void)is_message_owned; |
1665 | 96.3k | new (&_impl_) Impl_{ |
1666 | 96.3k | decltype(_impl_.chunk_){} |
1667 | 96.3k | , /*decltype(_impl_._cached_size_)*/{} |
1668 | 96.3k | , /*decltype(_impl_._oneof_case_)*/{} |
1669 | 96.3k | }; |
1670 | 96.3k | clear_has_chunk(); |
1671 | 96.3k | } |
1672 | | |
1673 | 96.3k | PngChunk::~PngChunk() { |
1674 | | // @@protoc_insertion_point(destructor:PngChunk) |
1675 | 96.3k | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
1676 | 0 | (void)arena; |
1677 | 0 | return; |
1678 | 0 | } |
1679 | 96.3k | SharedDtor(); |
1680 | 96.3k | } |
1681 | | |
1682 | 96.3k | inline void PngChunk::SharedDtor() { |
1683 | 96.3k | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
1684 | 96.3k | if (has_chunk()) { |
1685 | 87.4k | clear_chunk(); |
1686 | 87.4k | } |
1687 | 96.3k | } |
1688 | | |
1689 | 0 | void PngChunk::SetCachedSize(int size) const { |
1690 | 0 | _impl_._cached_size_.Set(size); |
1691 | 0 | } |
1692 | | |
1693 | 87.9k | void PngChunk::clear_chunk() { |
1694 | | // @@protoc_insertion_point(one_of_clear_start:PngChunk) |
1695 | 87.9k | switch (chunk_case()) { |
1696 | 3.01k | case kPlte: { |
1697 | 3.01k | if (GetArenaForAllocation() == nullptr) { |
1698 | 3.01k | delete _impl_.chunk_.plte_; |
1699 | 3.01k | } |
1700 | 3.01k | break; |
1701 | 0 | } |
1702 | 6.38k | case kIdat: { |
1703 | 6.38k | if (GetArenaForAllocation() == nullptr) { |
1704 | 6.38k | delete _impl_.chunk_.idat_; |
1705 | 6.38k | } |
1706 | 6.38k | break; |
1707 | 0 | } |
1708 | 11.9k | case kIccp: { |
1709 | 11.9k | if (GetArenaForAllocation() == nullptr) { |
1710 | 11.9k | delete _impl_.chunk_.iccp_; |
1711 | 11.9k | } |
1712 | 11.9k | break; |
1713 | 0 | } |
1714 | 66.1k | case kOtherChunk: { |
1715 | 66.1k | if (GetArenaForAllocation() == nullptr) { |
1716 | 66.1k | delete _impl_.chunk_.other_chunk_; |
1717 | 66.1k | } |
1718 | 66.1k | break; |
1719 | 0 | } |
1720 | 437 | case CHUNK_NOT_SET: { |
1721 | 437 | break; |
1722 | 0 | } |
1723 | 87.9k | } |
1724 | 87.9k | _impl_._oneof_case_[0] = CHUNK_NOT_SET; |
1725 | 87.9k | } |
1726 | | |
1727 | | |
1728 | 437 | void PngChunk::Clear() { |
1729 | | // @@protoc_insertion_point(message_clear_start:PngChunk) |
1730 | 437 | uint32_t cached_has_bits = 0; |
1731 | | // Prevent compiler warnings about cached_has_bits being unused |
1732 | 437 | (void) cached_has_bits; |
1733 | | |
1734 | 437 | clear_chunk(); |
1735 | 437 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
1736 | 437 | } |
1737 | | |
1738 | 0 | const char* PngChunk::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
1739 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1740 | 0 | while (!ctx->Done(&ptr)) { |
1741 | 0 | uint32_t tag; |
1742 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
1743 | 0 | switch (tag >> 3) { |
1744 | | // .PLTE plte = 1; |
1745 | 0 | case 1: |
1746 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
1747 | 0 | ptr = ctx->ParseMessage(_internal_mutable_plte(), ptr); |
1748 | 0 | CHK_(ptr); |
1749 | 0 | } else |
1750 | 0 | goto handle_unusual; |
1751 | 0 | continue; |
1752 | | // .IDAT idat = 2; |
1753 | 0 | case 2: |
1754 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { |
1755 | 0 | ptr = ctx->ParseMessage(_internal_mutable_idat(), ptr); |
1756 | 0 | CHK_(ptr); |
1757 | 0 | } else |
1758 | 0 | goto handle_unusual; |
1759 | 0 | continue; |
1760 | | // .iCCP iccp = 3; |
1761 | 0 | case 3: |
1762 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { |
1763 | 0 | ptr = ctx->ParseMessage(_internal_mutable_iccp(), ptr); |
1764 | 0 | CHK_(ptr); |
1765 | 0 | } else |
1766 | 0 | goto handle_unusual; |
1767 | 0 | continue; |
1768 | | // .OtherChunk other_chunk = 10000; |
1769 | 0 | case 10000: |
1770 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) { |
1771 | 0 | ptr = ctx->ParseMessage(_internal_mutable_other_chunk(), ptr); |
1772 | 0 | CHK_(ptr); |
1773 | 0 | } else |
1774 | 0 | goto handle_unusual; |
1775 | 0 | continue; |
1776 | 0 | default: |
1777 | 0 | goto handle_unusual; |
1778 | 0 | } // switch |
1779 | 0 | handle_unusual: |
1780 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
1781 | 0 | CHK_(ptr); |
1782 | 0 | ctx->SetLastTag(tag); |
1783 | 0 | goto message_done; |
1784 | 0 | } |
1785 | 0 | ptr = UnknownFieldParse( |
1786 | 0 | tag, |
1787 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
1788 | 0 | ptr, ctx); |
1789 | 0 | CHK_(ptr != nullptr); |
1790 | 0 | } // while |
1791 | 0 | message_done: |
1792 | 0 | return ptr; |
1793 | 0 | failure: |
1794 | 0 | ptr = nullptr; |
1795 | 0 | goto message_done; |
1796 | 0 | #undef CHK_ |
1797 | 0 | } |
1798 | | |
1799 | | uint8_t* PngChunk::_InternalSerialize( |
1800 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
1801 | | // @@protoc_insertion_point(serialize_to_array_start:PngChunk) |
1802 | 0 | uint32_t cached_has_bits = 0; |
1803 | 0 | (void) cached_has_bits; |
1804 | |
|
1805 | 0 | switch (chunk_case()) { |
1806 | 0 | case kPlte: { |
1807 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1808 | 0 | InternalWriteMessage(1, _Internal::plte(this), |
1809 | 0 | _Internal::plte(this).GetCachedSize(), target, stream); |
1810 | 0 | break; |
1811 | 0 | } |
1812 | 0 | case kIdat: { |
1813 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1814 | 0 | InternalWriteMessage(2, _Internal::idat(this), |
1815 | 0 | _Internal::idat(this).GetCachedSize(), target, stream); |
1816 | 0 | break; |
1817 | 0 | } |
1818 | 0 | case kIccp: { |
1819 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1820 | 0 | InternalWriteMessage(3, _Internal::iccp(this), |
1821 | 0 | _Internal::iccp(this).GetCachedSize(), target, stream); |
1822 | 0 | break; |
1823 | 0 | } |
1824 | 0 | case kOtherChunk: { |
1825 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1826 | 0 | InternalWriteMessage(10000, _Internal::other_chunk(this), |
1827 | 0 | _Internal::other_chunk(this).GetCachedSize(), target, stream); |
1828 | 0 | break; |
1829 | 0 | } |
1830 | 0 | default: ; |
1831 | 0 | } |
1832 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
1833 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
1834 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
1835 | 0 | } |
1836 | | // @@protoc_insertion_point(serialize_to_array_end:PngChunk) |
1837 | 0 | return target; |
1838 | 0 | } |
1839 | | |
1840 | 0 | size_t PngChunk::ByteSizeLong() const { |
1841 | | // @@protoc_insertion_point(message_byte_size_start:PngChunk) |
1842 | 0 | size_t total_size = 0; |
1843 | |
|
1844 | 0 | uint32_t cached_has_bits = 0; |
1845 | | // Prevent compiler warnings about cached_has_bits being unused |
1846 | 0 | (void) cached_has_bits; |
1847 | |
|
1848 | 0 | switch (chunk_case()) { |
1849 | | // .PLTE plte = 1; |
1850 | 0 | case kPlte: { |
1851 | 0 | total_size += 1 + |
1852 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1853 | 0 | *_impl_.chunk_.plte_); |
1854 | 0 | break; |
1855 | 0 | } |
1856 | | // .IDAT idat = 2; |
1857 | 0 | case kIdat: { |
1858 | 0 | total_size += 1 + |
1859 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1860 | 0 | *_impl_.chunk_.idat_); |
1861 | 0 | break; |
1862 | 0 | } |
1863 | | // .iCCP iccp = 3; |
1864 | 0 | case kIccp: { |
1865 | 0 | total_size += 1 + |
1866 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1867 | 0 | *_impl_.chunk_.iccp_); |
1868 | 0 | break; |
1869 | 0 | } |
1870 | | // .OtherChunk other_chunk = 10000; |
1871 | 0 | case kOtherChunk: { |
1872 | 0 | total_size += 3 + |
1873 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1874 | 0 | *_impl_.chunk_.other_chunk_); |
1875 | 0 | break; |
1876 | 0 | } |
1877 | 0 | case CHUNK_NOT_SET: { |
1878 | 0 | break; |
1879 | 0 | } |
1880 | 0 | } |
1881 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
1882 | 0 | } |
1883 | | |
1884 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PngChunk::_class_data_ = { |
1885 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
1886 | | PngChunk::MergeImpl |
1887 | | }; |
1888 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PngChunk::GetClassData() const { return &_class_data_; } |
1889 | | |
1890 | | |
1891 | 0 | void PngChunk::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
1892 | 0 | auto* const _this = static_cast<PngChunk*>(&to_msg); |
1893 | 0 | auto& from = static_cast<const PngChunk&>(from_msg); |
1894 | | // @@protoc_insertion_point(class_specific_merge_from_start:PngChunk) |
1895 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
1896 | 0 | uint32_t cached_has_bits = 0; |
1897 | 0 | (void) cached_has_bits; |
1898 | |
|
1899 | 0 | switch (from.chunk_case()) { |
1900 | 0 | case kPlte: { |
1901 | 0 | _this->_internal_mutable_plte()->::PLTE::MergeFrom( |
1902 | 0 | from._internal_plte()); |
1903 | 0 | break; |
1904 | 0 | } |
1905 | 0 | case kIdat: { |
1906 | 0 | _this->_internal_mutable_idat()->::IDAT::MergeFrom( |
1907 | 0 | from._internal_idat()); |
1908 | 0 | break; |
1909 | 0 | } |
1910 | 0 | case kIccp: { |
1911 | 0 | _this->_internal_mutable_iccp()->::iCCP::MergeFrom( |
1912 | 0 | from._internal_iccp()); |
1913 | 0 | break; |
1914 | 0 | } |
1915 | 0 | case kOtherChunk: { |
1916 | 0 | _this->_internal_mutable_other_chunk()->::OtherChunk::MergeFrom( |
1917 | 0 | from._internal_other_chunk()); |
1918 | 0 | break; |
1919 | 0 | } |
1920 | 0 | case CHUNK_NOT_SET: { |
1921 | 0 | break; |
1922 | 0 | } |
1923 | 0 | } |
1924 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
1925 | 0 | } |
1926 | | |
1927 | 0 | void PngChunk::CopyFrom(const PngChunk& from) { |
1928 | | // @@protoc_insertion_point(class_specific_copy_from_start:PngChunk) |
1929 | 0 | if (&from == this) return; |
1930 | 0 | Clear(); |
1931 | 0 | MergeFrom(from); |
1932 | 0 | } |
1933 | | |
1934 | 0 | bool PngChunk::IsInitialized() const { |
1935 | 0 | switch (chunk_case()) { |
1936 | 0 | case kPlte: { |
1937 | 0 | if (_internal_has_plte()) { |
1938 | 0 | if (!_impl_.chunk_.plte_->IsInitialized()) return false; |
1939 | 0 | } |
1940 | 0 | break; |
1941 | 0 | } |
1942 | 0 | case kIdat: { |
1943 | 0 | if (_internal_has_idat()) { |
1944 | 0 | if (!_impl_.chunk_.idat_->IsInitialized()) return false; |
1945 | 0 | } |
1946 | 0 | break; |
1947 | 0 | } |
1948 | 0 | case kIccp: { |
1949 | 0 | if (_internal_has_iccp()) { |
1950 | 0 | if (!_impl_.chunk_.iccp_->IsInitialized()) return false; |
1951 | 0 | } |
1952 | 0 | break; |
1953 | 0 | } |
1954 | 0 | case kOtherChunk: { |
1955 | 0 | if (_internal_has_other_chunk()) { |
1956 | 0 | if (!_impl_.chunk_.other_chunk_->IsInitialized()) return false; |
1957 | 0 | } |
1958 | 0 | break; |
1959 | 0 | } |
1960 | 0 | case CHUNK_NOT_SET: { |
1961 | 0 | break; |
1962 | 0 | } |
1963 | 0 | } |
1964 | 0 | return true; |
1965 | 0 | } |
1966 | | |
1967 | 0 | void PngChunk::InternalSwap(PngChunk* other) { |
1968 | 0 | using std::swap; |
1969 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
1970 | 0 | swap(_impl_.chunk_, other->_impl_.chunk_); |
1971 | 0 | swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); |
1972 | 0 | } |
1973 | | |
1974 | 838k | ::PROTOBUF_NAMESPACE_ID::Metadata PngChunk::GetMetadata() const { |
1975 | 838k | return ::_pbi::AssignDescriptors( |
1976 | 838k | &descriptor_table_png_5ffuzz_5fproto_2eproto_getter, &descriptor_table_png_5ffuzz_5fproto_2eproto_once, |
1977 | 838k | file_level_metadata_png_5ffuzz_5fproto_2eproto[5]); |
1978 | 838k | } |
1979 | | |
1980 | | // =================================================================== |
1981 | | |
1982 | | class PngProto::_Internal { |
1983 | | public: |
1984 | | using HasBits = decltype(std::declval<PngProto>()._impl_._has_bits_); |
1985 | | static const ::IHDR& ihdr(const PngProto* msg); |
1986 | 0 | static void set_has_ihdr(HasBits* has_bits) { |
1987 | 0 | (*has_bits)[0] |= 1u; |
1988 | 0 | } |
1989 | 0 | static bool MissingRequiredFields(const HasBits& has_bits) { |
1990 | 0 | return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0; |
1991 | 0 | } |
1992 | | }; |
1993 | | |
1994 | | const ::IHDR& |
1995 | 0 | PngProto::_Internal::ihdr(const PngProto* msg) { |
1996 | 0 | return *msg->_impl_.ihdr_; |
1997 | 0 | } |
1998 | | PngProto::PngProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
1999 | | bool is_message_owned) |
2000 | 18.1k | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
2001 | 18.1k | SharedCtor(arena, is_message_owned); |
2002 | | // @@protoc_insertion_point(arena_constructor:PngProto) |
2003 | 18.1k | } |
2004 | | PngProto::PngProto(const PngProto& from) |
2005 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
2006 | 0 | PngProto* const _this = this; (void)_this; |
2007 | 0 | new (&_impl_) Impl_{ |
2008 | 0 | decltype(_impl_._has_bits_){from._impl_._has_bits_} |
2009 | 0 | , /*decltype(_impl_._cached_size_)*/{} |
2010 | 0 | , decltype(_impl_.chunks_){from._impl_.chunks_} |
2011 | 0 | , decltype(_impl_.ihdr_){nullptr}}; |
2012 | |
|
2013 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
2014 | 0 | if (from._internal_has_ihdr()) { |
2015 | 0 | _this->_impl_.ihdr_ = new ::IHDR(*from._impl_.ihdr_); |
2016 | 0 | } |
2017 | | // @@protoc_insertion_point(copy_constructor:PngProto) |
2018 | 0 | } |
2019 | | |
2020 | | inline void PngProto::SharedCtor( |
2021 | 18.1k | ::_pb::Arena* arena, bool is_message_owned) { |
2022 | 18.1k | (void)arena; |
2023 | 18.1k | (void)is_message_owned; |
2024 | 18.1k | new (&_impl_) Impl_{ |
2025 | 18.1k | decltype(_impl_._has_bits_){} |
2026 | 18.1k | , /*decltype(_impl_._cached_size_)*/{} |
2027 | 18.1k | , decltype(_impl_.chunks_){arena} |
2028 | 18.1k | , decltype(_impl_.ihdr_){nullptr} |
2029 | 18.1k | }; |
2030 | 18.1k | } |
2031 | | |
2032 | 18.1k | PngProto::~PngProto() { |
2033 | | // @@protoc_insertion_point(destructor:PngProto) |
2034 | 18.1k | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
2035 | 0 | (void)arena; |
2036 | 0 | return; |
2037 | 0 | } |
2038 | 18.1k | SharedDtor(); |
2039 | 18.1k | } |
2040 | | |
2041 | 18.1k | inline void PngProto::SharedDtor() { |
2042 | 18.1k | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
2043 | 18.1k | _impl_.chunks_.~RepeatedPtrField(); |
2044 | 18.1k | if (this != internal_default_instance()) delete _impl_.ihdr_; |
2045 | 18.1k | } |
2046 | | |
2047 | 0 | void PngProto::SetCachedSize(int size) const { |
2048 | 0 | _impl_._cached_size_.Set(size); |
2049 | 0 | } |
2050 | | |
2051 | 36.3k | void PngProto::Clear() { |
2052 | | // @@protoc_insertion_point(message_clear_start:PngProto) |
2053 | 36.3k | uint32_t cached_has_bits = 0; |
2054 | | // Prevent compiler warnings about cached_has_bits being unused |
2055 | 36.3k | (void) cached_has_bits; |
2056 | | |
2057 | 36.3k | _impl_.chunks_.Clear(); |
2058 | 36.3k | cached_has_bits = _impl_._has_bits_[0]; |
2059 | 36.3k | if (cached_has_bits & 0x00000001u) { |
2060 | 2 | GOOGLE_DCHECK(_impl_.ihdr_ != nullptr); |
2061 | 2 | _impl_.ihdr_->Clear(); |
2062 | 2 | } |
2063 | 36.3k | _impl_._has_bits_.Clear(); |
2064 | 36.3k | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
2065 | 36.3k | } |
2066 | | |
2067 | 0 | const char* PngProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
2068 | 0 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2069 | 0 | _Internal::HasBits has_bits{}; |
2070 | 0 | while (!ctx->Done(&ptr)) { |
2071 | 0 | uint32_t tag; |
2072 | 0 | ptr = ::_pbi::ReadTag(ptr, &tag); |
2073 | 0 | switch (tag >> 3) { |
2074 | | // required .IHDR ihdr = 1; |
2075 | 0 | case 1: |
2076 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
2077 | 0 | ptr = ctx->ParseMessage(_internal_mutable_ihdr(), ptr); |
2078 | 0 | CHK_(ptr); |
2079 | 0 | } else |
2080 | 0 | goto handle_unusual; |
2081 | 0 | continue; |
2082 | | // repeated .PngChunk chunks = 2; |
2083 | 0 | case 2: |
2084 | 0 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { |
2085 | 0 | ptr -= 1; |
2086 | 0 | do { |
2087 | 0 | ptr += 1; |
2088 | 0 | ptr = ctx->ParseMessage(_internal_add_chunks(), ptr); |
2089 | 0 | CHK_(ptr); |
2090 | 0 | if (!ctx->DataAvailable(ptr)) break; |
2091 | 0 | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); |
2092 | 0 | } else |
2093 | 0 | goto handle_unusual; |
2094 | 0 | continue; |
2095 | 0 | default: |
2096 | 0 | goto handle_unusual; |
2097 | 0 | } // switch |
2098 | 0 | handle_unusual: |
2099 | 0 | if ((tag == 0) || ((tag & 7) == 4)) { |
2100 | 0 | CHK_(ptr); |
2101 | 0 | ctx->SetLastTag(tag); |
2102 | 0 | goto message_done; |
2103 | 0 | } |
2104 | 0 | ptr = UnknownFieldParse( |
2105 | 0 | tag, |
2106 | 0 | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
2107 | 0 | ptr, ctx); |
2108 | 0 | CHK_(ptr != nullptr); |
2109 | 0 | } // while |
2110 | 0 | message_done: |
2111 | 0 | _impl_._has_bits_.Or(has_bits); |
2112 | 0 | return ptr; |
2113 | 0 | failure: |
2114 | 0 | ptr = nullptr; |
2115 | 0 | goto message_done; |
2116 | 0 | #undef CHK_ |
2117 | 0 | } |
2118 | | |
2119 | | uint8_t* PngProto::_InternalSerialize( |
2120 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
2121 | | // @@protoc_insertion_point(serialize_to_array_start:PngProto) |
2122 | 0 | uint32_t cached_has_bits = 0; |
2123 | 0 | (void) cached_has_bits; |
2124 | |
|
2125 | 0 | cached_has_bits = _impl_._has_bits_[0]; |
2126 | | // required .IHDR ihdr = 1; |
2127 | 0 | if (cached_has_bits & 0x00000001u) { |
2128 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2129 | 0 | InternalWriteMessage(1, _Internal::ihdr(this), |
2130 | 0 | _Internal::ihdr(this).GetCachedSize(), target, stream); |
2131 | 0 | } |
2132 | | |
2133 | | // repeated .PngChunk chunks = 2; |
2134 | 0 | for (unsigned i = 0, |
2135 | 0 | n = static_cast<unsigned>(this->_internal_chunks_size()); i < n; i++) { |
2136 | 0 | const auto& repfield = this->_internal_chunks(i); |
2137 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2138 | 0 | InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); |
2139 | 0 | } |
2140 | |
|
2141 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
2142 | 0 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
2143 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
2144 | 0 | } |
2145 | | // @@protoc_insertion_point(serialize_to_array_end:PngProto) |
2146 | 0 | return target; |
2147 | 0 | } |
2148 | | |
2149 | 0 | size_t PngProto::ByteSizeLong() const { |
2150 | | // @@protoc_insertion_point(message_byte_size_start:PngProto) |
2151 | 0 | size_t total_size = 0; |
2152 | | |
2153 | | // required .IHDR ihdr = 1; |
2154 | 0 | if (_internal_has_ihdr()) { |
2155 | 0 | total_size += 1 + |
2156 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2157 | 0 | *_impl_.ihdr_); |
2158 | 0 | } |
2159 | 0 | uint32_t cached_has_bits = 0; |
2160 | | // Prevent compiler warnings about cached_has_bits being unused |
2161 | 0 | (void) cached_has_bits; |
2162 | | |
2163 | | // repeated .PngChunk chunks = 2; |
2164 | 0 | total_size += 1UL * this->_internal_chunks_size(); |
2165 | 0 | for (const auto& msg : this->_impl_.chunks_) { |
2166 | 0 | total_size += |
2167 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
2168 | 0 | } |
2169 | |
|
2170 | 0 | return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); |
2171 | 0 | } |
2172 | | |
2173 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PngProto::_class_data_ = { |
2174 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
2175 | | PngProto::MergeImpl |
2176 | | }; |
2177 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PngProto::GetClassData() const { return &_class_data_; } |
2178 | | |
2179 | | |
2180 | 0 | void PngProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
2181 | 0 | auto* const _this = static_cast<PngProto*>(&to_msg); |
2182 | 0 | auto& from = static_cast<const PngProto&>(from_msg); |
2183 | | // @@protoc_insertion_point(class_specific_merge_from_start:PngProto) |
2184 | 0 | GOOGLE_DCHECK_NE(&from, _this); |
2185 | 0 | uint32_t cached_has_bits = 0; |
2186 | 0 | (void) cached_has_bits; |
2187 | |
|
2188 | 0 | _this->_impl_.chunks_.MergeFrom(from._impl_.chunks_); |
2189 | 0 | if (from._internal_has_ihdr()) { |
2190 | 0 | _this->_internal_mutable_ihdr()->::IHDR::MergeFrom( |
2191 | 0 | from._internal_ihdr()); |
2192 | 0 | } |
2193 | 0 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
2194 | 0 | } |
2195 | | |
2196 | 0 | void PngProto::CopyFrom(const PngProto& from) { |
2197 | | // @@protoc_insertion_point(class_specific_copy_from_start:PngProto) |
2198 | 0 | if (&from == this) return; |
2199 | 0 | Clear(); |
2200 | 0 | MergeFrom(from); |
2201 | 0 | } |
2202 | | |
2203 | 0 | bool PngProto::IsInitialized() const { |
2204 | 0 | if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false; |
2205 | 0 | if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.chunks_)) |
2206 | 0 | return false; |
2207 | 0 | if (_internal_has_ihdr()) { |
2208 | 0 | if (!_impl_.ihdr_->IsInitialized()) return false; |
2209 | 0 | } |
2210 | 0 | return true; |
2211 | 0 | } |
2212 | | |
2213 | 0 | void PngProto::InternalSwap(PngProto* other) { |
2214 | 0 | using std::swap; |
2215 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
2216 | 0 | swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); |
2217 | 0 | _impl_.chunks_.InternalSwap(&other->_impl_.chunks_); |
2218 | 0 | swap(_impl_.ihdr_, other->_impl_.ihdr_); |
2219 | 0 | } |
2220 | | |
2221 | 471k | ::PROTOBUF_NAMESPACE_ID::Metadata PngProto::GetMetadata() const { |
2222 | 471k | return ::_pbi::AssignDescriptors( |
2223 | 471k | &descriptor_table_png_5ffuzz_5fproto_2eproto_getter, &descriptor_table_png_5ffuzz_5fproto_2eproto_once, |
2224 | 471k | file_level_metadata_png_5ffuzz_5fproto_2eproto[6]); |
2225 | 471k | } |
2226 | | |
2227 | | // @@protoc_insertion_point(namespace_scope) |
2228 | | PROTOBUF_NAMESPACE_OPEN |
2229 | | template<> PROTOBUF_NOINLINE ::IHDR* |
2230 | 18.1k | Arena::CreateMaybeMessage< ::IHDR >(Arena* arena) { |
2231 | 18.1k | return Arena::CreateMessageInternal< ::IHDR >(arena); |
2232 | 18.1k | } |
2233 | | template<> PROTOBUF_NOINLINE ::PLTE* |
2234 | 3.01k | Arena::CreateMaybeMessage< ::PLTE >(Arena* arena) { |
2235 | 3.01k | return Arena::CreateMessageInternal< ::PLTE >(arena); |
2236 | 3.01k | } |
2237 | | template<> PROTOBUF_NOINLINE ::IDAT* |
2238 | 6.38k | Arena::CreateMaybeMessage< ::IDAT >(Arena* arena) { |
2239 | 6.38k | return Arena::CreateMessageInternal< ::IDAT >(arena); |
2240 | 6.38k | } |
2241 | | template<> PROTOBUF_NOINLINE ::iCCP* |
2242 | 11.9k | Arena::CreateMaybeMessage< ::iCCP >(Arena* arena) { |
2243 | 11.9k | return Arena::CreateMessageInternal< ::iCCP >(arena); |
2244 | 11.9k | } |
2245 | | template<> PROTOBUF_NOINLINE ::OtherChunk* |
2246 | 66.1k | Arena::CreateMaybeMessage< ::OtherChunk >(Arena* arena) { |
2247 | 66.1k | return Arena::CreateMessageInternal< ::OtherChunk >(arena); |
2248 | 66.1k | } |
2249 | | template<> PROTOBUF_NOINLINE ::PngChunk* |
2250 | 96.3k | Arena::CreateMaybeMessage< ::PngChunk >(Arena* arena) { |
2251 | 96.3k | return Arena::CreateMessageInternal< ::PngChunk >(arena); |
2252 | 96.3k | } |
2253 | | template<> PROTOBUF_NOINLINE ::PngProto* |
2254 | 0 | Arena::CreateMaybeMessage< ::PngProto >(Arena* arena) { |
2255 | 0 | return Arena::CreateMessageInternal< ::PngProto >(arena); |
2256 | 0 | } |
2257 | | PROTOBUF_NAMESPACE_CLOSE |
2258 | | |
2259 | | // @@protoc_insertion_point(global_scope) |
2260 | | #include <google/protobuf/port_undef.inc> |