• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2023 Google LLC.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 #ifndef UPB_IO_CHUNKED_INPUT_STREAM_H_
9 #define UPB_IO_CHUNKED_INPUT_STREAM_H_
10 
11 #include "upb/io/zero_copy_input_stream.h"
12 #include "upb/mem/arena.h"
13 
14 // Must be last.
15 #include "upb/port/def.inc"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 // A ZeroCopyInputStream which wraps a flat buffer and limits the number of
22 // bytes that can be returned by a single call to Next().
23 upb_ZeroCopyInputStream* upb_ChunkedInputStream_New(const void* data,
24                                                     size_t size, size_t limit,
25                                                     upb_Arena* arena);
26 
27 #ifdef __cplusplus
28 } /* extern "C" */
29 #endif
30 
31 #include "upb/port/undef.inc"
32 
33 #endif /* UPB_IO_CHUNKED_INPUT_STREAM_H_ */
34