Skip to main content

svn_stream_checksummed2

Function svn_stream_checksummed2 

Source
pub unsafe extern "C" fn svn_stream_checksummed2(
    stream: *mut svn_stream_t,
    read_checksum: *mut *mut svn_checksum_t,
    write_checksum: *mut *mut svn_checksum_t,
    checksum_kind: svn_checksum_kind_t,
    read_all: svn_boolean_t,
    pool: *mut apr_pool_t,
) -> *mut svn_stream_t
Expand description

Return a stream that calculates checksums for all data read and written. The stream @a stream is used to read and write all data. The stream and the resulting digests are allocated in @a pool.

When the stream is closed, @a *read_checksum and @a *write_checksum are set to point to the resulting checksums, of type @a read_checksum_kind and @a write_checksum_kind, respectively.

Both @a read_checksum and @a write_checksum can be @c NULL, in which case the respective checksum isn’t calculated.

If @a read_all is TRUE, make sure that all data available on @a stream is read (and checksummed) when the stream is closed.

Read and write operations can be mixed without interfering.

The @a stream passed into this function is closed when the created stream is closed.

@since New in 1.6. Since 1.10, the resulting stream supports reset via stream_stream_reset().