FreeBSD/contrib/subversion/subversion/libsvn_subr/packed_data.c
/* Take the binary data in UNCOMPRESSED, zip it into COMPRESSED and write
 * it to STREAM.  COMPRESSED simply acts as a re-usable memory buffer.
 * Clear all buffers (COMPRESSED, UNCOMPRESSED) at the end of the function.
 */
Take the binary data in UNCOMPRESSED, zip it into COMPRESSED and write
it to STREAM.  COMPRESSED simply acts as a re-usable memory buffer.
Clear all buffers (COMPRESSED, UNCOMPRESSED) at the end of the function.
Take the binary data in UNCOMPRESSED zip it into COMPRESSED and write it to STREAM . COMPRESSED simply acts as a re - usable memory buffer . Clear all buffers ( COMPRESSED UNCOMPRESSED ) at the end of the function .
static svn_error_t *
write_stream_data(svn_stream_t *stream,
                  svn_stringbuf_t *uncompressed,
                  svn_stringbuf_t *compressed)
{
  SVN_ERR(svn__compress(uncompressed,
                        compressed,
                        SVN_DELTA_COMPRESSION_LEVEL_DEFAULT));
  SVN_ERR(write_stream_uint(stream, compressed->len));
  SVN_ERR(svn_stream_write(stream, compressed->data, &compressed->len));
  svn_stringbuf_setempty(uncompressed);
  svn_stringbuf_setempty(compressed);
  return SVN_NO_ERROR;
}
static svn_error_t * write_stream_data ( svn_stream_t * stream , svn_stringbuf_t * uncompressed , svn_stringbuf_t * compressed ) { SVN_ERR ( svn__compress ( uncompressed , compressed , SVN_DELTA_COMPRESSION_LEVEL_DEFAULT ) ) ; SVN_ERR ( write_stream_uint ( stream , compressed -> len ) ) ; SVN_ERR ( svn_stream_write ( stream , compressed -> data , & compressed -> len ) ) ; svn_stringbuf_setempty ( uncompressed ) ; svn_stringbuf_setempty ( compressed ) ; return SVN_NO_ERROR ; }
Take the binary data in UNCOMPRESSED, zip it into COMPRESSED and write
 it to STREAM.
Take the binary data in UNCOMPRESSED zip it into COMPRESSED and write it to STREAM .