package capnp
Module Runtime.FragmentBufferSource
FragmentBuffer provides efficient management of large numbers of string fragments. Reading a large message from a pipe, for example, may lead to construction of large numbers of fragments which need to parsed and refactored into a list of message segments. Use of the FragmentBuffer helps to avoid the inefficient construction of intermediate strings.
Create a new fragment buffer containing the contents of the string.
Remove a specific number of bytes from the front of the fragment buffer.
Remove at least the specified number of bytes from the front of the fragment buffer. This is a less expensive operation than remove_exact.
Examine a specific number of bytes from the front of the fragment buffer, without removing the data.