Add QuicheDataReader::ReadStringPiece8
This complements ReadStringPiece16 and will be used for CHLO parsing.
gfe-relnote: n/a, new unused code
PiperOrigin-RevId: 305970104
Change-Id: I4d4a17da254fa49ea469ff6be7c7a9d5cfa0347f
diff --git a/common/quiche_data_reader.h b/common/quiche_data_reader.h
index c837172..bd67873 100644
--- a/common/quiche_data_reader.h
+++ b/common/quiche_data_reader.h
@@ -65,6 +65,15 @@
// Returns true on success, false otherwise.
bool ReadStringPiece16(quiche::QuicheStringPiece* result);
+ // Reads a string prefixed with 8-bit length into the given output parameter.
+ //
+ // NOTE: Does not copy but rather references strings in the underlying buffer.
+ // This should be kept in mind when handling memory management!
+ //
+ // Forwards the internal iterator on success.
+ // Returns true on success, false otherwise.
+ bool ReadStringPiece8(quiche::QuicheStringPiece* result);
+
// Reads a given number of bytes into the given buffer. The buffer
// must be of adequate size.
// Forwards the internal iterator on success.