mtree_init, mtree_free - initialize and free a merkle tree
Contents
Description
The tree_init function initializes the merkle tree structure tree with base data size sz. sz is the size
in bytes of the base file or data which will be used to build the tree by calling mtree_build(3).
Errors
ENOMEM Not enough space/cannot allocate memory (POSIX.1-2001).
Library
Librecast library (liblibrecast, -llibrecast)
Name
mtree_init, mtree_free - initialize and free a merkle tree
Return Value
mtree_init() returns zero on success. On error, -1 is returned, and errno is set to indicate the error.
The mtree_free() function returns no value, and preserves errno.
See Also
mdex_get(3), mdex_put(3), mdex_del(3) LIBRECAST 2023-06-20 MTREE_INIT(3)
Synopsis
#include<librecast/mtree.h>intmtree_init(mtree_t*tree,size_tsz);voidmtree_free(mtree_t*tree);
Compile and link with -llibrecast.
