aboutsummaryrefslogtreecommitdiff
path: root/src/fs/fs_tree.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-04-22 13:14:29 +0000
committerChristian Grothoff <christian@grothoff.org>2010-04-22 13:14:29 +0000
commiteb5c56279680c2337bb4a752a7d1f269c7d13888 (patch)
treeefe819172ac79e57599ebb249b905030454f9c4f /src/fs/fs_tree.h
parentdb3d5a7a998d816be1810967a74454b45f830f1c (diff)
downloadgnunet-eb5c56279680c2337bb4a752a7d1f269c7d13888.tar.gz
gnunet-eb5c56279680c2337bb4a752a7d1f269c7d13888.zip
resume and less debug crap
Diffstat (limited to 'src/fs/fs_tree.h')
-rw-r--r--src/fs/fs_tree.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/fs/fs_tree.h b/src/fs/fs_tree.h
index bfbd7019b..82b897bd3 100644
--- a/src/fs/fs_tree.h
+++ b/src/fs/fs_tree.h
@@ -144,6 +144,36 @@ void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder * te,
144 char **emsg); 144 char **emsg);
145 145
146 146
147/**
148 * Compute the size of the current IBlock.
149 *
150 * @param height height of the IBlock in the tree (aka overall
151 * number of tree levels minus depth); 0 == DBlock
152 * @param offset current offset in the overall file
153 * @return size of the corresponding IBlock
154 */
155uint16_t
156GNUNET_FS_tree_compute_iblock_size (unsigned int height,
157 uint64_t offset);
158
159
160/**
161 * Compute how many bytes of data should be stored in
162 * the specified node.
163 *
164 * @param fsize overall file size
165 * @param totaldepth depth of the entire tree
166 * @param offset offset of the node
167 * @param depth depth of the node
168 * @return number of bytes stored in this node
169 */
170size_t
171GNUNET_FS_tree_calculate_block_size (uint64_t fsize,
172 unsigned int totaldepth,
173 uint64_t offset,
174 unsigned int depth);
175
176
147#if 0 177#if 0
148/* the functions below will be needed for persistence 178/* the functions below will be needed for persistence
149 but are not yet implemented -- FIXME... */ 179 but are not yet implemented -- FIXME... */