From f703a7f099ed24c783a24fc889a41c8af27734f0 Mon Sep 17 00:00:00 2001 From: Constantine Vetoshev Date: Fri, 24 Jun 2016 13:27:54 -0700 Subject: [PATCH] Update segment (de)serialization documentation. --- docs/quickstart.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index b19ad55..3b7a1a8 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -308,6 +308,8 @@ There are also packed versions:: Byte Segments ~~~~~~~~~~~~~ +.. note:: This feature is not supported in PyPy at the moment, pending investigation. + Cap'n Proto supports a serialization mode which minimizes object copies. In the C++ interface, ``capnp::MessageBuilder::getSegmentsForOutput()`` returns an array of pointers to segments of the message's content without copying. ``capnp::SegmentArrayMessageReader`` performs the reverse operation, i.e., takes an array of pointers to segments and uses the underlying data, again without copying. This produces a different wire serialization format from ``to_bytes()`` serialization, which uses ``capnp::messageToFlatArray()`` and ``capnp::FlatArrayMessageReader`` (both of which use segments internally, but write them in an incompatible way). For compatibility on the Python side, use the ``to_segments()`` and ``from_segments()`` functions::