summaryrefslogtreecommitdiffstats
path: root/doxygen/dox/cookbook/Files.dox
diff options
context:
space:
mode:
Diffstat (limited to 'doxygen/dox/cookbook/Files.dox')
-rw-r--r--doxygen/dox/cookbook/Files.dox31
1 files changed, 31 insertions, 0 deletions
diff --git a/doxygen/dox/cookbook/Files.dox b/doxygen/dox/cookbook/Files.dox
new file mode 100644
index 0000000..0b918a0
--- /dev/null
+++ b/doxygen/dox/cookbook/Files.dox
@@ -0,0 +1,31 @@
+/** \page Files
+
+\section Files
+
+\subsection CB_UserBlock Creating an HDF5 File User Block
+
+\par Problem
+You would like to include certain ancillary, non-HDF5 content in an
+HDF5 file such that it can be accessed without the HDF5 library.
+
+\par Solution
+Use a file creation property list in which the user block size is set via
+H5Pset_userblock(). In the example below, we create an 8 MiB user block.
+\snippet{lineno} Files.c user_block
+
+\par Discussion
+The user block begins at offset 0 and must be at least 512 bytes and a power
+of 2. The HDF5 library ignores any content between the beginning of the
+file and the end of the user block.\n
+You can add or strip a user block to/from an existing HDF5 file with the
+\Code{h5jam}/\Code{h5unjam} tool, respectively.
+\warning
+If you try to embed content into the user block for use by other applications,
+pay close attention to how they handle space beyond the last used byte in the
+user block or the user block in general. In the worst case, applications might
+try to truncate the rest of the file and destroy the HDF5 portion of the file.
+
+\par See Also
+References to related recipes
+
+ */ \ No newline at end of file