summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2010-05-13 20:49:31 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2010-05-13 20:49:31 (GMT)
commit5f2cf7e80c30200be4d975117d7d98249416b9e4 (patch)
treedf6e70421921eedf1db9d0637542e40915b4e500
parent26205360a42b6a579f62a25810f34813582c84ab (diff)
downloadhdf5-5f2cf7e80c30200be4d975117d7d98249416b9e4.zip
hdf5-5f2cf7e80c30200be4d975117d7d98249416b9e4.tar.gz
hdf5-5f2cf7e80c30200be4d975117d7d98249416b9e4.tar.bz2
[svn-r18794] Enhancement 1853:
Install packed-bits feature for h5dump. testfiles/packedbits.h5: New HDF5 test data file. Generated by h5dump/h5dumpgentest. testfiles/tpbitsLengthPositive.ddl: testfiles/tpbitsMaxExceeded.ddl: testfiles/tpbitsSigned.ddl: testfiles/tpbitsOffsetNegative.ddl: testfiles/tpbitsUnsigned.ddl: testfiles/tpbitsMax.ddl: testfiles/tpbitsIncomplete.ddl: testfiles/tpbitsOverlapped.ddl: testfiles/tpbitsLengthExceeded.ddl: testfiles/tpbitsOffsetExceeded.ddl: Expected output files created to test various components of the packed-bits feature. testfiles/tpackedbits2.ddl: testfiles/tpackedbits.ddl: Previous output files no longer used. Tested: albertPax (linux)
-rw-r--r--tools/testfiles/packedbits.h5bin0 -> 7776 bytes
-rw-r--r--tools/testfiles/tpackedbits.ddl22
-rw-r--r--tools/testfiles/tpackedbits2.ddl35
-rw-r--r--tools/testfiles/tpbitsIncomplete.ddl90
-rw-r--r--tools/testfiles/tpbitsLengthExceeded.ddl90
-rw-r--r--tools/testfiles/tpbitsLengthPositive.ddl90
-rw-r--r--tools/testfiles/tpbitsMax.ddl97
-rw-r--r--tools/testfiles/tpbitsMaxExceeded.ddl90
-rw-r--r--tools/testfiles/tpbitsOffsetExceeded.ddl90
-rw-r--r--tools/testfiles/tpbitsOffsetNegative.ddl90
-rw-r--r--tools/testfiles/tpbitsOverlapped.ddl53
-rw-r--r--tools/testfiles/tpbitsSigned.ddl31
-rw-r--r--tools/testfiles/tpbitsUnsigned.ddl31
13 files changed, 752 insertions, 57 deletions
diff --git a/tools/testfiles/packedbits.h5 b/tools/testfiles/packedbits.h5
new file mode 100644
index 0000000..3db1883
--- /dev/null
+++ b/tools/testfiles/packedbits.h5
Binary files differ
diff --git a/tools/testfiles/tpackedbits.ddl b/tools/testfiles/tpackedbits.ddl
deleted file mode 100644
index 2f1e9a1..0000000
--- a/tools/testfiles/tpackedbits.ddl
+++ /dev/null
@@ -1,22 +0,0 @@
-#############################
-Expected output for 'h5dump -d /dset1 -M 0,2 tdset.h5'
-#############################
-HDF5 "tdset.h5" {
-DATASET "/dset1" {
- DATATYPE H5T_STD_I32BE
- DATASPACE SIMPLE { ( 10, 20 ) / ( 10, 20 ) }
- PACKED_BITS OFFSET=0 LENGTH=2
- DATA {
- (0,0): 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
- (1,0): 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0,
- (2,0): 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1,
- (3,0): 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2,
- (4,0): 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
- (5,0): 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0,
- (6,0): 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1,
- (7,0): 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2,
- (8,0): 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
- (9,0): 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0
- }
-}
-}
diff --git a/tools/testfiles/tpackedbits2.ddl b/tools/testfiles/tpackedbits2.ddl
deleted file mode 100644
index 4f11bbe..0000000
--- a/tools/testfiles/tpackedbits2.ddl
+++ /dev/null
@@ -1,35 +0,0 @@
-#############################
-Expected output for 'h5dump -d /dset1 -M 0,2,2,1 tdset.h5'
-#############################
-HDF5 "tdset.h5" {
-DATASET "/dset1" {
- DATATYPE H5T_STD_I32BE
- DATASPACE SIMPLE { ( 10, 20 ) / ( 10, 20 ) }
- PACKED_BITS OFFSET=0 LENGTH=2
- DATA {
- (0,0): 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
- (1,0): 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0,
- (2,0): 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1,
- (3,0): 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2,
- (4,0): 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
- (5,0): 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0,
- (6,0): 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1,
- (7,0): 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2,
- (8,0): 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3,
- (9,0): 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0
- }
- PACKED_BITS OFFSET=2 LENGTH=1
- DATA {
- (0,0): 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,
- (1,0): 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1,
- (2,0): 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1,
- (3,0): 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1,
- (4,0): 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1,
- (5,0): 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0,
- (6,0): 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0,
- (7,0): 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0,
- (8,0): 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,
- (9,0): 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1
- }
-}
-}
diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl
new file mode 100644
index 0000000..dbde4f5
--- /dev/null
+++ b/tools/testfiles/tpbitsIncomplete.ddl
@@ -0,0 +1,90 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5'
+#############################
+usage: h5dump [OPTIONS] file
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -n, --contents Print a list of the file contents and exit
+ -B, --superblock Print the content of the super block
+ -H, --header Print the header only; no data is displayed
+ -A, --onlyattr Print the header and value of attributes
+ -i, --object-ids Print the object ids
+ -r, --string Print 1-byte integer datasets as ASCII
+ -e, --escape Escape non printing characters
+ -V, --version Print version number and exit
+ -a P, --attribute=P Print the specified attribute
+ -d P, --dataset=P Print the specified dataset
+ -y, --noindex Do not print array indices with the data
+ -p, --properties Print dataset filters, storage layout and fill value
+ -f D, --filedriver=D Specify which driver to open the file with
+ -g P, --group=P Print the specified group and all members
+ -l P, --soft-link=P Print the value(s) of the specified soft link
+ -o F, --output=F Output raw data into file F
+ -b B, --binary=B Binary file output, of form B
+ -t P, --datatype=P Print the specified named datatype
+ -w N, --width=N Set the number of columns of output. A value of 0 (zero)
+ sets the number of columns to the maximum (65535).
+ Default width is 80 columns.
+ -m T, --format=T Set the floating point output format
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
+ -M M, --packedbits=M Print packed bits using mask format M for dataset P given
+ in option d. Where M is (offset,length)[,(offset,length)].
+ -R, --region Print dataset pointed by region references
+ -x, --xml Output in XML using Schema
+ -u, --use-dtd Output in XML using DTD
+ -D U, --xml-dtd=U Use the DTD or schema at U
+ -X S, --xml-ns=S (XML Schema) Use qualified names n the XML
+ ":": no namespace, default: "hdf5:"
+ E.g., to dump a file called `-f', use h5dump -- -f
+
+ Subsetting is available by using the following options with a dataset
+ attribute. Subsetting is done by selecting a hyperslab from the data.
+ Thus, the options mirror those for performing a hyperslab selection.
+ One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+
+ -s START, --start=START Offset of start of subsetting selection
+ -S STRIDE, --stride=STRIDE Hyperslab stride
+ -c COUNT, --count=COUNT Number of blocks to include in selection
+ -k BLOCK, --block=BLOCK Size of block in hyperslab
+ START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the
+ number of dimensions in the dataspace being queried
+
+ D - is the file driver to use in opening the file. Acceptable values
+ are "sec2", "family", "split", "multi", "direct", and "stream". Without
+ the file driver flag, the file will be opened with each driver in
+ turn and in the order specified above until one driver succeeds
+ in opening the file.
+ F - is a filename.
+ P - is the full path from the root group to the object.
+ N - is an integer greater than 1.
+ T - is a string containing the floating point format, e.g '%.3f'
+ U - is a URI reference (as defined in [IETF RFC 2396],
+ updated by [IETF RFC 2732])
+ B - is the form of binary output: NATIVE for a memory type, FILE for the
+ file type, LE or BE for pre-existing little or big endian types.
+ Must be used with -o (output file) and it is recommended that
+ -d (dataset) is used. B is an optional argument, defaults to NATIVE
+ Q - is the sort index type. It can be "creation_order" or "name" (default)
+ Z - is the sort order type. It can be "descending" or "ascending" (default)
+ M - is a paired list of integers the first number of which is the offset and the
+ second number is the length of the its being queried
+
+ Examples:
+
+ 1) Attribute foo of the group /bar_none in file quux.h5
+
+ h5dump -a /bar_none/foo quux.h5
+
+ 2) Selecting a subset from dataset /foo in file quux.h5
+
+ h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5
+
+ 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin'
+ using a little-endian type
+
+ h5dump -d /dset -b LE -o out.bin quux.h5
+
+h5dump error: Bad mask list(0,2,2,1,0,2,2,)
diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl
new file mode 100644
index 0000000..6b02648
--- /dev/null
+++ b/tools/testfiles/tpbitsLengthExceeded.ddl
@@ -0,0 +1,90 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 2,7 packedbits.h5'
+#############################
+usage: h5dump [OPTIONS] file
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -n, --contents Print a list of the file contents and exit
+ -B, --superblock Print the content of the super block
+ -H, --header Print the header only; no data is displayed
+ -A, --onlyattr Print the header and value of attributes
+ -i, --object-ids Print the object ids
+ -r, --string Print 1-byte integer datasets as ASCII
+ -e, --escape Escape non printing characters
+ -V, --version Print version number and exit
+ -a P, --attribute=P Print the specified attribute
+ -d P, --dataset=P Print the specified dataset
+ -y, --noindex Do not print array indices with the data
+ -p, --properties Print dataset filters, storage layout and fill value
+ -f D, --filedriver=D Specify which driver to open the file with
+ -g P, --group=P Print the specified group and all members
+ -l P, --soft-link=P Print the value(s) of the specified soft link
+ -o F, --output=F Output raw data into file F
+ -b B, --binary=B Binary file output, of form B
+ -t P, --datatype=P Print the specified named datatype
+ -w N, --width=N Set the number of columns of output. A value of 0 (zero)
+ sets the number of columns to the maximum (65535).
+ Default width is 80 columns.
+ -m T, --format=T Set the floating point output format
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
+ -M M, --packedbits=M Print packed bits using mask format M for dataset P given
+ in option d. Where M is (offset,length)[,(offset,length)].
+ -R, --region Print dataset pointed by region references
+ -x, --xml Output in XML using Schema
+ -u, --use-dtd Output in XML using DTD
+ -D U, --xml-dtd=U Use the DTD or schema at U
+ -X S, --xml-ns=S (XML Schema) Use qualified names n the XML
+ ":": no namespace, default: "hdf5:"
+ E.g., to dump a file called `-f', use h5dump -- -f
+
+ Subsetting is available by using the following options with a dataset
+ attribute. Subsetting is done by selecting a hyperslab from the data.
+ Thus, the options mirror those for performing a hyperslab selection.
+ One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+
+ -s START, --start=START Offset of start of subsetting selection
+ -S STRIDE, --stride=STRIDE Hyperslab stride
+ -c COUNT, --count=COUNT Number of blocks to include in selection
+ -k BLOCK, --block=BLOCK Size of block in hyperslab
+ START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the
+ number of dimensions in the dataspace being queried
+
+ D - is the file driver to use in opening the file. Acceptable values
+ are "sec2", "family", "split", "multi", "direct", and "stream". Without
+ the file driver flag, the file will be opened with each driver in
+ turn and in the order specified above until one driver succeeds
+ in opening the file.
+ F - is a filename.
+ P - is the full path from the root group to the object.
+ N - is an integer greater than 1.
+ T - is a string containing the floating point format, e.g '%.3f'
+ U - is a URI reference (as defined in [IETF RFC 2396],
+ updated by [IETF RFC 2732])
+ B - is the form of binary output: NATIVE for a memory type, FILE for the
+ file type, LE or BE for pre-existing little or big endian types.
+ Must be used with -o (output file) and it is recommended that
+ -d (dataset) is used. B is an optional argument, defaults to NATIVE
+ Q - is the sort index type. It can be "creation_order" or "name" (default)
+ Z - is the sort order type. It can be "descending" or "ascending" (default)
+ M - is a paired list of integers the first number of which is the offset and the
+ second number is the length of the its being queried
+
+ Examples:
+
+ 1) Attribute foo of the group /bar_none in file quux.h5
+
+ h5dump -a /bar_none/foo quux.h5
+
+ 2) Selecting a subset from dataset /foo in file quux.h5
+
+ h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5
+
+ 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin'
+ using a little-endian type
+
+ h5dump -d /dset -b LE -o out.bin quux.h5
+
+h5dump error: Packed Bit offset+length value(9) too large. Max is 8
diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl
new file mode 100644
index 0000000..0f4093e
--- /dev/null
+++ b/tools/testfiles/tpbitsLengthPositive.ddl
@@ -0,0 +1,90 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 4,0 packedbits.h5'
+#############################
+usage: h5dump [OPTIONS] file
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -n, --contents Print a list of the file contents and exit
+ -B, --superblock Print the content of the super block
+ -H, --header Print the header only; no data is displayed
+ -A, --onlyattr Print the header and value of attributes
+ -i, --object-ids Print the object ids
+ -r, --string Print 1-byte integer datasets as ASCII
+ -e, --escape Escape non printing characters
+ -V, --version Print version number and exit
+ -a P, --attribute=P Print the specified attribute
+ -d P, --dataset=P Print the specified dataset
+ -y, --noindex Do not print array indices with the data
+ -p, --properties Print dataset filters, storage layout and fill value
+ -f D, --filedriver=D Specify which driver to open the file with
+ -g P, --group=P Print the specified group and all members
+ -l P, --soft-link=P Print the value(s) of the specified soft link
+ -o F, --output=F Output raw data into file F
+ -b B, --binary=B Binary file output, of form B
+ -t P, --datatype=P Print the specified named datatype
+ -w N, --width=N Set the number of columns of output. A value of 0 (zero)
+ sets the number of columns to the maximum (65535).
+ Default width is 80 columns.
+ -m T, --format=T Set the floating point output format
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
+ -M M, --packedbits=M Print packed bits using mask format M for dataset P given
+ in option d. Where M is (offset,length)[,(offset,length)].
+ -R, --region Print dataset pointed by region references
+ -x, --xml Output in XML using Schema
+ -u, --use-dtd Output in XML using DTD
+ -D U, --xml-dtd=U Use the DTD or schema at U
+ -X S, --xml-ns=S (XML Schema) Use qualified names n the XML
+ ":": no namespace, default: "hdf5:"
+ E.g., to dump a file called `-f', use h5dump -- -f
+
+ Subsetting is available by using the following options with a dataset
+ attribute. Subsetting is done by selecting a hyperslab from the data.
+ Thus, the options mirror those for performing a hyperslab selection.
+ One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+
+ -s START, --start=START Offset of start of subsetting selection
+ -S STRIDE, --stride=STRIDE Hyperslab stride
+ -c COUNT, --count=COUNT Number of blocks to include in selection
+ -k BLOCK, --block=BLOCK Size of block in hyperslab
+ START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the
+ number of dimensions in the dataspace being queried
+
+ D - is the file driver to use in opening the file. Acceptable values
+ are "sec2", "family", "split", "multi", "direct", and "stream". Without
+ the file driver flag, the file will be opened with each driver in
+ turn and in the order specified above until one driver succeeds
+ in opening the file.
+ F - is a filename.
+ P - is the full path from the root group to the object.
+ N - is an integer greater than 1.
+ T - is a string containing the floating point format, e.g '%.3f'
+ U - is a URI reference (as defined in [IETF RFC 2396],
+ updated by [IETF RFC 2732])
+ B - is the form of binary output: NATIVE for a memory type, FILE for the
+ file type, LE or BE for pre-existing little or big endian types.
+ Must be used with -o (output file) and it is recommended that
+ -d (dataset) is used. B is an optional argument, defaults to NATIVE
+ Q - is the sort index type. It can be "creation_order" or "name" (default)
+ Z - is the sort order type. It can be "descending" or "ascending" (default)
+ M - is a paired list of integers the first number of which is the offset and the
+ second number is the length of the its being queried
+
+ Examples:
+
+ 1) Attribute foo of the group /bar_none in file quux.h5
+
+ h5dump -a /bar_none/foo quux.h5
+
+ 2) Selecting a subset from dataset /foo in file quux.h5
+
+ h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5
+
+ 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin'
+ using a little-endian type
+
+ h5dump -d /dset -b LE -o out.bin quux.h5
+
+h5dump error: Packed Bit length value(0) must be positive.
diff --git a/tools/testfiles/tpbitsMax.ddl b/tools/testfiles/tpbitsMax.ddl
new file mode 100644
index 0000000..a4528ff
--- /dev/null
+++ b/tools/testfiles/tpbitsMax.ddl
@@ -0,0 +1,97 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=0 LENGTH=1
+ DATA {
+ (0,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=1 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (1,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=2 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 1, 0, 0, 0, 0, 0,
+ (1,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (2,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=3 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 1, 1, 0, 0, 0, 0,
+ (1,0): 1, 1, 1, 0, 0, 0, 0, 0,
+ (2,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (3,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=4 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 1, 1, 1, 0, 0, 0,
+ (1,0): 1, 1, 1, 1, 0, 0, 0, 0,
+ (2,0): 1, 1, 1, 0, 0, 0, 0, 0,
+ (3,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (4,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=5 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 1, 1, 1, 1, 0, 0,
+ (1,0): 1, 1, 1, 1, 1, 0, 0, 0,
+ (2,0): 1, 1, 1, 1, 0, 0, 0, 0,
+ (3,0): 1, 1, 1, 0, 0, 0, 0, 0,
+ (4,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (5,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=6 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 1, 1, 1, 1, 1, 0,
+ (1,0): 1, 1, 1, 1, 1, 1, 0, 0,
+ (2,0): 1, 1, 1, 1, 1, 0, 0, 0,
+ (3,0): 1, 1, 1, 1, 0, 0, 0, 0,
+ (4,0): 1, 1, 1, 0, 0, 0, 0, 0,
+ (5,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (6,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=7 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 1, 1, 1, 1, 1, 1,
+ (1,0): 1, 1, 1, 1, 1, 1, 1, 0,
+ (2,0): 1, 1, 1, 1, 1, 1, 0, 0,
+ (3,0): 1, 1, 1, 1, 1, 0, 0, 0,
+ (4,0): 1, 1, 1, 1, 0, 0, 0, 0,
+ (5,0): 1, 1, 1, 0, 0, 0, 0, 0,
+ (6,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (7,0): 1, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsMaxExceeded.ddl b/tools/testfiles/tpbitsMaxExceeded.ddl
new file mode 100644
index 0000000..01e854d
--- /dev/null
+++ b/tools/testfiles/tpbitsMaxExceeded.ddl
@@ -0,0 +1,90 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5'
+#############################
+usage: h5dump [OPTIONS] file
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -n, --contents Print a list of the file contents and exit
+ -B, --superblock Print the content of the super block
+ -H, --header Print the header only; no data is displayed
+ -A, --onlyattr Print the header and value of attributes
+ -i, --object-ids Print the object ids
+ -r, --string Print 1-byte integer datasets as ASCII
+ -e, --escape Escape non printing characters
+ -V, --version Print version number and exit
+ -a P, --attribute=P Print the specified attribute
+ -d P, --dataset=P Print the specified dataset
+ -y, --noindex Do not print array indices with the data
+ -p, --properties Print dataset filters, storage layout and fill value
+ -f D, --filedriver=D Specify which driver to open the file with
+ -g P, --group=P Print the specified group and all members
+ -l P, --soft-link=P Print the value(s) of the specified soft link
+ -o F, --output=F Output raw data into file F
+ -b B, --binary=B Binary file output, of form B
+ -t P, --datatype=P Print the specified named datatype
+ -w N, --width=N Set the number of columns of output. A value of 0 (zero)
+ sets the number of columns to the maximum (65535).
+ Default width is 80 columns.
+ -m T, --format=T Set the floating point output format
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
+ -M M, --packedbits=M Print packed bits using mask format M for dataset P given
+ in option d. Where M is (offset,length)[,(offset,length)].
+ -R, --region Print dataset pointed by region references
+ -x, --xml Output in XML using Schema
+ -u, --use-dtd Output in XML using DTD
+ -D U, --xml-dtd=U Use the DTD or schema at U
+ -X S, --xml-ns=S (XML Schema) Use qualified names n the XML
+ ":": no namespace, default: "hdf5:"
+ E.g., to dump a file called `-f', use h5dump -- -f
+
+ Subsetting is available by using the following options with a dataset
+ attribute. Subsetting is done by selecting a hyperslab from the data.
+ Thus, the options mirror those for performing a hyperslab selection.
+ One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+
+ -s START, --start=START Offset of start of subsetting selection
+ -S STRIDE, --stride=STRIDE Hyperslab stride
+ -c COUNT, --count=COUNT Number of blocks to include in selection
+ -k BLOCK, --block=BLOCK Size of block in hyperslab
+ START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the
+ number of dimensions in the dataspace being queried
+
+ D - is the file driver to use in opening the file. Acceptable values
+ are "sec2", "family", "split", "multi", "direct", and "stream". Without
+ the file driver flag, the file will be opened with each driver in
+ turn and in the order specified above until one driver succeeds
+ in opening the file.
+ F - is a filename.
+ P - is the full path from the root group to the object.
+ N - is an integer greater than 1.
+ T - is a string containing the floating point format, e.g '%.3f'
+ U - is a URI reference (as defined in [IETF RFC 2396],
+ updated by [IETF RFC 2732])
+ B - is the form of binary output: NATIVE for a memory type, FILE for the
+ file type, LE or BE for pre-existing little or big endian types.
+ Must be used with -o (output file) and it is recommended that
+ -d (dataset) is used. B is an optional argument, defaults to NATIVE
+ Q - is the sort index type. It can be "creation_order" or "name" (default)
+ Z - is the sort order type. It can be "descending" or "ascending" (default)
+ M - is a paired list of integers the first number of which is the offset and the
+ second number is the length of the its being queried
+
+ Examples:
+
+ 1) Attribute foo of the group /bar_none in file quux.h5
+
+ h5dump -a /bar_none/foo quux.h5
+
+ 2) Selecting a subset from dataset /foo in file quux.h5
+
+ h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5
+
+ 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin'
+ using a little-endian type
+
+ h5dump -d /dset -b LE -o out.bin quux.h5
+
+h5dump error: Too many masks requested (max. 8). Mask list(0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1)
diff --git a/tools/testfiles/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl
new file mode 100644
index 0000000..cf7055e
--- /dev/null
+++ b/tools/testfiles/tpbitsOffsetExceeded.ddl
@@ -0,0 +1,90 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 8,1 packedbits.h5'
+#############################
+usage: h5dump [OPTIONS] file
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -n, --contents Print a list of the file contents and exit
+ -B, --superblock Print the content of the super block
+ -H, --header Print the header only; no data is displayed
+ -A, --onlyattr Print the header and value of attributes
+ -i, --object-ids Print the object ids
+ -r, --string Print 1-byte integer datasets as ASCII
+ -e, --escape Escape non printing characters
+ -V, --version Print version number and exit
+ -a P, --attribute=P Print the specified attribute
+ -d P, --dataset=P Print the specified dataset
+ -y, --noindex Do not print array indices with the data
+ -p, --properties Print dataset filters, storage layout and fill value
+ -f D, --filedriver=D Specify which driver to open the file with
+ -g P, --group=P Print the specified group and all members
+ -l P, --soft-link=P Print the value(s) of the specified soft link
+ -o F, --output=F Output raw data into file F
+ -b B, --binary=B Binary file output, of form B
+ -t P, --datatype=P Print the specified named datatype
+ -w N, --width=N Set the number of columns of output. A value of 0 (zero)
+ sets the number of columns to the maximum (65535).
+ Default width is 80 columns.
+ -m T, --format=T Set the floating point output format
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
+ -M M, --packedbits=M Print packed bits using mask format M for dataset P given
+ in option d. Where M is (offset,length)[,(offset,length)].
+ -R, --region Print dataset pointed by region references
+ -x, --xml Output in XML using Schema
+ -u, --use-dtd Output in XML using DTD
+ -D U, --xml-dtd=U Use the DTD or schema at U
+ -X S, --xml-ns=S (XML Schema) Use qualified names n the XML
+ ":": no namespace, default: "hdf5:"
+ E.g., to dump a file called `-f', use h5dump -- -f
+
+ Subsetting is available by using the following options with a dataset
+ attribute. Subsetting is done by selecting a hyperslab from the data.
+ Thus, the options mirror those for performing a hyperslab selection.
+ One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+
+ -s START, --start=START Offset of start of subsetting selection
+ -S STRIDE, --stride=STRIDE Hyperslab stride
+ -c COUNT, --count=COUNT Number of blocks to include in selection
+ -k BLOCK, --block=BLOCK Size of block in hyperslab
+ START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the
+ number of dimensions in the dataspace being queried
+
+ D - is the file driver to use in opening the file. Acceptable values
+ are "sec2", "family", "split", "multi", "direct", and "stream". Without
+ the file driver flag, the file will be opened with each driver in
+ turn and in the order specified above until one driver succeeds
+ in opening the file.
+ F - is a filename.
+ P - is the full path from the root group to the object.
+ N - is an integer greater than 1.
+ T - is a string containing the floating point format, e.g '%.3f'
+ U - is a URI reference (as defined in [IETF RFC 2396],
+ updated by [IETF RFC 2732])
+ B - is the form of binary output: NATIVE for a memory type, FILE for the
+ file type, LE or BE for pre-existing little or big endian types.
+ Must be used with -o (output file) and it is recommended that
+ -d (dataset) is used. B is an optional argument, defaults to NATIVE
+ Q - is the sort index type. It can be "creation_order" or "name" (default)
+ Z - is the sort order type. It can be "descending" or "ascending" (default)
+ M - is a paired list of integers the first number of which is the offset and the
+ second number is the length of the its being queried
+
+ Examples:
+
+ 1) Attribute foo of the group /bar_none in file quux.h5
+
+ h5dump -a /bar_none/foo quux.h5
+
+ 2) Selecting a subset from dataset /foo in file quux.h5
+
+ h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5
+
+ 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin'
+ using a little-endian type
+
+ h5dump -d /dset -b LE -o out.bin quux.h5
+
+h5dump error: Packed Bit offset value(8) must be between 0 and 7
diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl
new file mode 100644
index 0000000..b514bca
--- /dev/null
+++ b/tools/testfiles/tpbitsOffsetNegative.ddl
@@ -0,0 +1,90 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M -1,1 packedbits.h5'
+#############################
+usage: h5dump [OPTIONS] file
+ OPTIONS
+ -h, --help Print a usage message and exit
+ -n, --contents Print a list of the file contents and exit
+ -B, --superblock Print the content of the super block
+ -H, --header Print the header only; no data is displayed
+ -A, --onlyattr Print the header and value of attributes
+ -i, --object-ids Print the object ids
+ -r, --string Print 1-byte integer datasets as ASCII
+ -e, --escape Escape non printing characters
+ -V, --version Print version number and exit
+ -a P, --attribute=P Print the specified attribute
+ -d P, --dataset=P Print the specified dataset
+ -y, --noindex Do not print array indices with the data
+ -p, --properties Print dataset filters, storage layout and fill value
+ -f D, --filedriver=D Specify which driver to open the file with
+ -g P, --group=P Print the specified group and all members
+ -l P, --soft-link=P Print the value(s) of the specified soft link
+ -o F, --output=F Output raw data into file F
+ -b B, --binary=B Binary file output, of form B
+ -t P, --datatype=P Print the specified named datatype
+ -w N, --width=N Set the number of columns of output. A value of 0 (zero)
+ sets the number of columns to the maximum (65535).
+ Default width is 80 columns.
+ -m T, --format=T Set the floating point output format
+ -q Q, --sort_by=Q Sort groups and attributes by index Q
+ -z Z, --sort_order=Z Sort groups and attributes by order Z
+ -M M, --packedbits=M Print packed bits using mask format M for dataset P given
+ in option d. Where M is (offset,length)[,(offset,length)].
+ -R, --region Print dataset pointed by region references
+ -x, --xml Output in XML using Schema
+ -u, --use-dtd Output in XML using DTD
+ -D U, --xml-dtd=U Use the DTD or schema at U
+ -X S, --xml-ns=S (XML Schema) Use qualified names n the XML
+ ":": no namespace, default: "hdf5:"
+ E.g., to dump a file called `-f', use h5dump -- -f
+
+ Subsetting is available by using the following options with a dataset
+ attribute. Subsetting is done by selecting a hyperslab from the data.
+ Thus, the options mirror those for performing a hyperslab selection.
+ One of the START, COUNT, STRIDE, or BLOCK parameters are mandatory if you do subsetting.
+ The STRIDE, COUNT, and BLOCK parameters are optional and will default to 1 in
+ each dimension. START is optional and will default to 0 in each dimension.
+
+ -s START, --start=START Offset of start of subsetting selection
+ -S STRIDE, --stride=STRIDE Hyperslab stride
+ -c COUNT, --count=COUNT Number of blocks to include in selection
+ -k BLOCK, --block=BLOCK Size of block in hyperslab
+ START, COUNT, STRIDE, and BLOCK - is a list of integers the number of which are equal to the
+ number of dimensions in the dataspace being queried
+
+ D - is the file driver to use in opening the file. Acceptable values
+ are "sec2", "family", "split", "multi", "direct", and "stream". Without
+ the file driver flag, the file will be opened with each driver in
+ turn and in the order specified above until one driver succeeds
+ in opening the file.
+ F - is a filename.
+ P - is the full path from the root group to the object.
+ N - is an integer greater than 1.
+ T - is a string containing the floating point format, e.g '%.3f'
+ U - is a URI reference (as defined in [IETF RFC 2396],
+ updated by [IETF RFC 2732])
+ B - is the form of binary output: NATIVE for a memory type, FILE for the
+ file type, LE or BE for pre-existing little or big endian types.
+ Must be used with -o (output file) and it is recommended that
+ -d (dataset) is used. B is an optional argument, defaults to NATIVE
+ Q - is the sort index type. It can be "creation_order" or "name" (default)
+ Z - is the sort order type. It can be "descending" or "ascending" (default)
+ M - is a paired list of integers the first number of which is the offset and the
+ second number is the length of the its being queried
+
+ Examples:
+
+ 1) Attribute foo of the group /bar_none in file quux.h5
+
+ h5dump -a /bar_none/foo quux.h5
+
+ 2) Selecting a subset from dataset /foo in file quux.h5
+
+ h5dump -d /foo -s "0,1" -S "1,1" -c "2,3" -k "2,2" quux.h5
+
+ 3) Saving dataset 'dset' in file quux.h5 to binary file 'out.bin'
+ using a little-endian type
+
+ h5dump -d /dset -b LE -o out.bin quux.h5
+
+h5dump error: Bad mask list(-1,1)
diff --git a/tools/testfiles/tpbitsOverlapped.ddl b/tools/testfiles/tpbitsOverlapped.ddl
new file mode 100644
index 0000000..2814c4b
--- /dev/null
+++ b/tools/testfiles/tpbitsOverlapped.ddl
@@ -0,0 +1,53 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=0 LENGTH=1
+ DATA {
+ (0,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=1 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (1,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=2 LENGTH=1
+ DATA {
+ (0,0): 1, 1, 1, 0, 0, 0, 0, 0,
+ (1,0): 1, 1, 0, 0, 0, 0, 0, 0,
+ (2,0): 1, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=0 LENGTH=3
+ DATA {
+ (0,0): 7, 6, 4, 0, 0, 0, 0, 0,
+ (1,0): 6, 4, 0, 0, 0, 0, 0, 0,
+ (2,0): 4, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSigned.ddl b/tools/testfiles/tpbitsSigned.ddl
new file mode 100644
index 0000000..7db3b32
--- /dev/null
+++ b/tools/testfiles/tpbitsSigned.ddl
@@ -0,0 +1,31 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 0,2,2,6 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=0 LENGTH=2
+ DATA {
+ (0,0): 3, 2, 0, 0, 0, 0, 0, 0,
+ (1,0): 2, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=2 LENGTH=6
+ DATA {
+ (0,0): 63, 63, 63, 62, 60, 56, 48, 32,
+ (1,0): 63, 63, 62, 60, 56, 48, 32, 0,
+ (2,0): 63, 62, 60, 56, 48, 32, 0, 0,
+ (3,0): 62, 60, 56, 48, 32, 0, 0, 0,
+ (4,0): 60, 56, 48, 32, 0, 0, 0, 0,
+ (5,0): 56, 48, 32, 0, 0, 0, 0, 0,
+ (6,0): 48, 32, 0, 0, 0, 0, 0, 0,
+ (7,0): 32, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsigned.ddl b/tools/testfiles/tpbitsUnsigned.ddl
new file mode 100644
index 0000000..0aaf40a
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsigned.ddl
@@ -0,0 +1,31 @@
+#############################
+Expected output for 'h5dump -d /DU08BITS -M 0,2,2,6 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU08BITS" {
+ DATATYPE H5T_STD_U8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=0 LENGTH=2
+ DATA {
+ (0,0): 3, 2, 0, 0, 0, 0, 0, 0,
+ (1,0): 2, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=2 LENGTH=6
+ DATA {
+ (0,0): 63, 63, 63, 62, 60, 56, 48, 32,
+ (1,0): 63, 63, 62, 60, 56, 48, 32, 0,
+ (2,0): 63, 62, 60, 56, 48, 32, 0, 0,
+ (3,0): 62, 60, 56, 48, 32, 0, 0, 0,
+ (4,0): 60, 56, 48, 32, 0, 0, 0, 0,
+ (5,0): 56, 48, 32, 0, 0, 0, 0, 0,
+ (6,0): 48, 32, 0, 0, 0, 0, 0, 0,
+ (7,0): 32, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}