jam -u user_block -i in_file.h5 [-o out_file.h5] [-clobber]jam -hunjam -i in_file.h5 [-u user_block | --delete] [-o out_file.h5]unjam -hjam concatenates
a user_block file and and HDF5 file to create an HDF5 file with a user block. The user
block can be any test (binary or text). The output file is padded so
that the HDF5 header begins on byte 512, 1024, etc.. (See the HDF5 File
Format.)
- If
out_file.h5is given, a new file is created with theuser_blockfollowed by the contents ofin_file.h5.In this case,infile.h5is unchanged.
Ifout_file.h5is not specified, theuser_blockis added toin_file.h5.
- If in_file.h5 already has a user block, the contents of
user_blockwill be added to the end of the existing user block, and hte file shifted to the next boundary. If-clobberis set, any existing user block will be overwritten.
unjam splits an HDF5 file, writing the
user block to a file or stdout and the HDF5 file to an HDF5 file with a header at byte
0 (i.e., with no user block).
- If
out_file.h5is given, a new file is created with thein_file.h5withoutthe user block.In this case,infile.h5is unchanged.
Ifout_file.h5is not specified, theuser_blockis removed andin_file.h5is rewritten, starting at byte 0.
Ifuser_blockis set,the user block will be written touser_block. Ifuser_blockis not set, the user block (if any)will be written to stdout. If-deleteis selected, the user block will not be not written.
Create new file,newfile.h5, with the text in filemytext.txtas the user block for the HDF5 filefile.h5.
Add text in filejam -u mytext.txt -i file.h5 -o newfile.h5
mytext.txtto front of HDF5 dataset,file.h5.
Overwrite the user block (if any) injam -u mytext.txt -i file.h5
file.h5with the contents ofmytext.txt.
For an HDF5 file,jam -u mytext.txt -i file.h5 --clobber
with_ub.h5, with a user block, extract the user block touser_block.txtand the HDF5 file towo_ub.h5.
unjam -i with_ub.h5 -u user_block.txt -i wo_ub.h5
jamreturns the size of the output file, or -1 if an error occurs.
unjamreturns the size of the output file, or -1 if an error occurs.
- HDF5 Format at <<link to hdf5 spec.>>