FreeBSD/contrib/subversion/subversion/libsvn_subr/packed_data.c
/* Read the packed contents from COMBINED, starting at *OFFSET and store
 * it in STREAM.  Update *OFFSET to point to the next stream's data and
 * continue with the sub-streams.
 */
Read the packed contents from COMBINED, starting at *OFFSET and store
it in STREAM.  Update *OFFSET to point to the next stream's data and
continue with the sub-streams.
Read the packed contents from COMBINED starting at * OFFSET and store it in STREAM . Update * OFFSET to point to the next stream ' s data and continue with the sub - streams .
static void
unflatten_byte_stream(svn_packed__byte_stream_t *stream,
                      svn_stringbuf_t *combined,
                      apr_size_t *offset)
{
  memcpy(stream->packed->data,
         combined->data + *offset,
         stream->packed->len);
  stream->packed->data[stream->packed->len] = '\0';
  *offset += stream->packed->len;
  for (stream = stream->first_substream; stream; stream = stream->next)
    unflatten_byte_stream(stream, combined, offset);
}
static void unflatten_byte_stream ( svn_packed__byte_stream_t * stream , svn_stringbuf_t * combined , apr_size_t * offset ) { memcpy ( stream -> packed -> data , combined -> data + * offset , stream -> packed -> len ) ; stream -> packed -> data [ stream -> packed -> len ] = ' \0 ' ; * offset += stream -> packed -> len ; for ( stream = stream -> first_substream ; stream ; stream = stream -> next ) unflatten_byte_stream ( stream , combined , offset ) ; }
Read the packed contents from COMBINED, starting at *OFFSET and store
 it in STREAM.
Read the packed contents from COMBINED starting at * OFFSET and store it in STREAM .