Crypt-Rhash

 view release on metacpan or  search on metacpan

librhash/rhash_torrent.h  view on Meta::CPAN

/**
 * Calculate, using uTorrent algorithm, the default torrent piece length
 * for a given torrent batch size.
 *
 * @param total_size the total size of files included into a torrent file
 * @return piece length for the torrent file
 */
RHASH_API size_t rhash_torrent_get_default_piece_length(unsigned long long total_size);

/*
 * Macro to set a torrent batch size (the total size of files included into this torrent).
 * It's defined as rhash_torrent_set_piece_length(ctx, rhash_torrent_get_default_piece_length(total_size))
 *
 * @param ctx rhash context
 * @param total_size total size of files included into the torrent file
 */
#define rhash_torrent_set_batch_size(ctx, total_size) \
	rhash_torrent_set_piece_length((ctx), rhash_torrent_get_default_piece_length(total_size))

/**
 * Get the content of the generated torrent file.



( run in 0.452 second using v1.01-cache-2.11-cpan-49f99fa48dc )