Simplify QuicStreamSendBuffer::SaveStreamData().

This is a reland of cr/432178898 with the only difference at  The reason for revert at cr/432192634 was: error: no matching function for call to 'min'
      size_t slice_len = std::min(data.length(), max_data_slice_size);

I was able to reproduce this error locally, and verify that adding an explicit template
parameter to std::min solves it, by the following command:

  blaze --blazerc=/dev/null test --config=android_x86 --compilation_mode=opt \
    --android_sdk=//third_party/java/android/android_sdk_linux/platforms/stable:android_sdk_tools \
    --incompatible_enable_android_toolchain_resolution=1 \
    --//third_party/android/ndk:min_sdk_version=28 \
    --incompatible_enable_cc_toolchain_resolution=1 \
    --android_grte_top=//third_party/android/ndk/platforms/android-28:everything \
    --define='PORTABLE_PROTO_TRANSITION_MODE=google3' \
    --grte_top=//third_party/android/ndk/platforms/android-28:everything \

SaveStreamData()is called at two places in production:
QuicCryptoStream::WriteCryptoData() and QuicStream::WriteOrBufferDataAtLevel(),
both times with an iovec created locally from an absl::string_view.  In order to
reduce complexity, this CL changes SaveStreamData() to take an absl::string_view
directly instead of an iovec.
PiperOrigin-RevId: 432207712
13 files changed
tree: 6345fdc126a7436444d6be910a989d02b5131462
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/


QUICHE stands for QUIC, Http/2, Etc. It is Google‘s production-ready implementation of QUIC, HTTP/2, HTTP/3, and related protocols and tools. It powers Google’s servers, Chromium, Envoy, and other projects. It is actively developed and maintained.

There are two public QUICHE repositories. Either one may be used by embedders, as they are automatically kept in sync:

To embed QUICHE in your project, platform APIs need to be implemented and build files need to be created. Note that it is on the QUICHE team's roadmap to include default implementation for all platform APIs and to open-source build files. In the meanwhile, take a look at open source embedders like Chromium and Envoy to get started:

To contribute to QUICHE, follow instructions at

QUICHE is only supported on little-endian platforms.