FreeBSD/contrib/subversion/subversion/libsvn_subr/packed_data.c
/* Read the integer stream structure and recreate it in STREAM, including
 * sub-streams, from TREE_STRUCT.
 */
Read the integer stream structure and recreate it in STREAM, including
sub-streams, from TREE_STRUCT.
Read the integer stream structure and recreate it in STREAM including sub - streams from TREE_STRUCT .
static void
read_int_stream_structure(svn_stringbuf_t *tree_struct,
                          svn_packed__int_stream_t *stream)
{
  packed_int_private_t *private_data = stream->private_data;
  apr_uint64_t value = read_packed_uint(tree_struct);
  apr_size_t substream_count;
  apr_size_t i;
  private_data->diff = (value & 1) != 0;
  private_data->is_signed = (value & 2) != 0;
  substream_count = (apr_size_t)(value >> 2);
  private_data->item_count = (apr_size_t)read_packed_uint(tree_struct);
  value = read_packed_uint(tree_struct);
  if (value)
    {
      private_data->packed = svn_stringbuf_create_ensure((apr_size_t)value,
                                                         private_data->pool);
      private_data->packed->len = (apr_size_t)value;
    }
  for (i = 0; i < substream_count; ++i)
    read_int_stream_structure(tree_struct,
                              svn_packed__create_int_substream(stream,
                                                               FALSE,
                                                               FALSE));
}
static void read_int_stream_structure ( svn_stringbuf_t * tree_struct , svn_packed__int_stream_t * stream ) { packed_int_private_t * private_data = stream -> private_data ; apr_uint64_t value = read_packed_uint ( tree_struct ) ; apr_size_t substream_count ; apr_size_t i ; private_data -> diff = ( value & 1 ) != 0 ; private_data -> is_signed = ( value & 2 ) != 0 ; substream_count = ( apr_size_t ) ( value >> 2 ) ; private_data -> item_count = ( apr_size_t ) read_packed_uint ( tree_struct ) ; value = read_packed_uint ( tree_struct ) ; if ( value ) { private_data -> packed = svn_stringbuf_create_ensure ( ( apr_size_t ) value , private_data -> pool ) ; private_data -> packed -> len = ( apr_size_t ) value ; } for ( i = 0 ; i < substream_count ; ++ i ) read_int_stream_structure ( tree_struct , svn_packed__create_int_substream ( stream , FALSE , FALSE ) ) ; }
Read the integer stream structure and recreate it in STREAM, including
 sub-streams, from TREE_STRUCT.
Read the integer stream structure and recreate it in STREAM including sub - streams from TREE_STRUCT .
/* extract local parameters */ /* read item count & packed size; allocate packed data buffer */ /* add sub-streams and read their config, too */