-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kUpb_DecodeOption_AlwaysValidateUtf8 decode option, to force UTF-…
…8 validation of proto2 strings. Also slightly optimized _upb_Decoder_GetDelimitedOp, which should result in a modest speedup parsing protos with many bytes fields (or proto2 string fields), and submessages. PiperOrigin-RevId: 584944649
- Loading branch information
1 parent
499c748
commit 5e049b7
Showing
6 changed files
with
194 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Protocol Buffers - Google's data interchange format | ||
// Copyright 2023 Google LLC. All rights reserved. | ||
// | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file or at | ||
// https://developers.google.com/open-source/licenses/bsd | ||
|
||
syntax = "proto2"; | ||
|
||
package upb_test; | ||
|
||
message TestUtf8Proto2Bytes { | ||
optional bytes data = 1; | ||
} | ||
|
||
message TestUtf8RepeatedProto2Bytes { | ||
optional bytes data = 1; | ||
} | ||
|
||
message TestUtf8Proto2String { | ||
optional string data = 1; | ||
} | ||
|
||
message TestUtf8RepeatedProto2String { | ||
repeated string data = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters