jam -u user_block -i in_file.h5 [-o out_file.h5] [-clobber]
jam -h
unjam -i in_file.h5
[-u user_block | --delete] [
-o out_file.h5]
unjam -h
jam
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.h5
is given, a new file is created with theuser_block
followed by the contents ofin_file.h5.
In this case,infile.h5
is unchanged.
Ifout_file.h5
is not specified, theuser_block
is added toin_file.h5
.
- If in_file.h5 already has a user block, the contents of
user_block
will be added to the end of the existing user block, and hte file shifted to the next boundary. If-clobber
is 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.h5
is given, a new file is created with thein_file.h5
withoutthe user block.
In this case,
infile.h5
is unchanged.
Ifout_file.h5
is not specified, theuser_block
is removed andin_file.h5
is rewritten, starting at byte 0.
Ifuser_block
is set,the user block will be written touser_block
. Ifuser_block
is not set, the user block (if any)will be written to stdout. If
-delete
is selected, the user block will not be not written.
Create new file,newfile.h5
, with the text in filemytext.txt
as the user block for the HDF5 filefile.h5
.
Add text in filejam -u mytext.txt -i file.h5 -o newfile.h5
mytext.txt
to front of HDF5 dataset,file.h5
.
Overwrite the user block (if any) injam -u mytext.txt -i file.h5
file.h5
with 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.txt
and the HDF5 file towo_ub.h5
.
unjam -i with_ub.h5 -u user_block.txt -i wo_ub.h5
jam
returns the size of the output file, or -1 if an error occurs.
unjam
returns the size of the output file, or -1 if an error occurs.
- HDF5 Format at <<link to hdf5 spec.>>