summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST56
-rw-r--r--config/cmake/ConfigureChecks.cmake1
-rw-r--r--config/cmake/H5pubconf.h.in3
-rwxr-xr-xconfig/cmake/cacheinit.cmake2
-rwxr-xr-xconfig/cmake/mccacheinit.cmake2
-rw-r--r--tools/h5dump/CMakeLists.txt271
-rw-r--r--tools/h5dump/h5dump.c250
-rw-r--r--tools/h5dump/h5dump.h5
-rw-r--r--tools/h5dump/testh5dump.sh.in91
-rw-r--r--tools/lib/h5tools.c5
-rw-r--r--tools/lib/h5tools.h6
-rw-r--r--tools/lib/h5tools_str.c58
-rw-r--r--tools/testfiles/tnofilename-with-packed-bits.ddl97
-rw-r--r--tools/testfiles/tpbitsArray.ddl17
-rw-r--r--tools/testfiles/tpbitsCharLengthExceeded.ddl21
-rw-r--r--tools/testfiles/tpbitsCharOffsetExceeded.ddl21
-rw-r--r--tools/testfiles/tpbitsCompound.ddl69
-rw-r--r--tools/testfiles/tpbitsIncomplete.ddl98
-rw-r--r--tools/testfiles/tpbitsIntLengthExceeded.ddl21
-rw-r--r--tools/testfiles/tpbitsIntOffsetExceeded.ddl21
-rw-r--r--tools/testfiles/tpbitsLengthExceeded.ddl98
-rw-r--r--tools/testfiles/tpbitsLengthPositive.ddl98
-rw-r--r--tools/testfiles/tpbitsLongLengthExceeded.ddl29
-rw-r--r--tools/testfiles/tpbitsLongOffsetExceeded.ddl29
-rw-r--r--tools/testfiles/tpbitsMax.ddl97
-rw-r--r--tools/testfiles/tpbitsMaxExceeded.ddl98
-rw-r--r--tools/testfiles/tpbitsOffsetExceeded.ddl98
-rw-r--r--tools/testfiles/tpbitsOffsetNegative.ddl98
-rw-r--r--tools/testfiles/tpbitsOverlapped.ddl53
-rw-r--r--tools/testfiles/tpbitsSigned.ddl31
-rw-r--r--tools/testfiles/tpbitsSigned2.ddl53
-rw-r--r--tools/testfiles/tpbitsSigned4.ddl31
-rw-r--r--tools/testfiles/tpbitsSignedInt.ddl31
-rw-r--r--tools/testfiles/tpbitsSignedInt4.ddl53
-rw-r--r--tools/testfiles/tpbitsSignedInt8.ddl37
-rw-r--r--tools/testfiles/tpbitsSignedIntWhole.ddl28
-rw-r--r--tools/testfiles/tpbitsSignedLong.ddl47
-rw-r--r--tools/testfiles/tpbitsSignedLong16.ddl70
-rw-r--r--tools/testfiles/tpbitsSignedLong8.ddl99
-rw-r--r--tools/testfiles/tpbitsSignedLongLong.ddl71
-rw-r--r--tools/testfiles/tpbitsSignedLongLong16.ddl199
-rw-r--r--tools/testfiles/tpbitsSignedLongLong32.ddl178
-rw-r--r--tools/testfiles/tpbitsSignedLongLongWhole.ddl124
-rw-r--r--tools/testfiles/tpbitsSignedLongLongWhole1.ddl178
-rw-r--r--tools/testfiles/tpbitsSignedLongLongWhole63.ddl175
-rw-r--r--tools/testfiles/tpbitsSignedLongWhole.ddl49
-rw-r--r--tools/testfiles/tpbitsSignedWhole.ddl20
-rw-r--r--tools/testfiles/tpbitsUnsigned.ddl31
-rw-r--r--tools/testfiles/tpbitsUnsigned2.ddl53
-rw-r--r--tools/testfiles/tpbitsUnsigned4.ddl31
-rw-r--r--tools/testfiles/tpbitsUnsignedInt.ddl31
-rw-r--r--tools/testfiles/tpbitsUnsignedInt4.ddl53
-rw-r--r--tools/testfiles/tpbitsUnsignedInt8.ddl37
-rw-r--r--tools/testfiles/tpbitsUnsignedIntWhole.ddl28
-rw-r--r--tools/testfiles/tpbitsUnsignedLong.ddl47
-rw-r--r--tools/testfiles/tpbitsUnsignedLong16.ddl70
-rw-r--r--tools/testfiles/tpbitsUnsignedLong8.ddl99
-rw-r--r--tools/testfiles/tpbitsUnsignedLongLong.ddl71
-rw-r--r--tools/testfiles/tpbitsUnsignedLongLong16.ddl199
-rw-r--r--tools/testfiles/tpbitsUnsignedLongLong32.ddl178
-rw-r--r--tools/testfiles/tpbitsUnsignedLongLongWhole.ddl179
-rw-r--r--tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl178
-rw-r--r--tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl175
-rw-r--r--tools/testfiles/tpbitsUnsignedLongWhole.ddl62
-rw-r--r--tools/testfiles/tpbitsUnsignedWhole.ddl20
65 files changed, 4814 insertions, 15 deletions
diff --git a/MANIFEST b/MANIFEST
index cb7a781..0a27390 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1169,7 +1169,6 @@
./tools/testfiles/family_file00017.h5
./tools/testfiles/filter_fail.h5
./tools/testfiles/filter_fail.ddl
-./tools/testfiles/packedbits.h5
./tools/testfiles/packedbits.ddl
./tools/testfiles/file_space.h5
./tools/testfiles/file_space.ddl
@@ -1363,6 +1362,61 @@
./tools/testfiles/tbigdims.ddl
./tools/testfiles/tbigdims.h5
./tools/testfiles/thyperslab.h5
+# h5dump packed bits validation
+./tools/testfiles/tnofilename-with-packed-bits.ddl
+./tools/testfiles/tpbitsLengthPositive.ddl
+./tools/testfiles/tpbitsMaxExceeded.ddl
+./tools/testfiles/tpbitsSigned.ddl
+./tools/testfiles/tpbitsSigned2.ddl
+./tools/testfiles/tpbitsSigned4.ddl
+./tools/testfiles/tpbitsSignedWhole.ddl
+./tools/testfiles/tpbitsSignedInt.ddl
+./tools/testfiles/tpbitsSignedInt4.ddl
+./tools/testfiles/tpbitsSignedInt8.ddl
+./tools/testfiles/tpbitsSignedIntWhole.ddl
+./tools/testfiles/tpbitsSignedLong.ddl
+./tools/testfiles/tpbitsSignedLong8.ddl
+./tools/testfiles/tpbitsSignedLong16.ddl
+./tools/testfiles/tpbitsSignedLongWhole.ddl
+./tools/testfiles/tpbitsSignedLongLong.ddl
+./tools/testfiles/tpbitsSignedLongLong16.ddl
+./tools/testfiles/tpbitsSignedLongLong32.ddl
+./tools/testfiles/tpbitsSignedLongLongWhole.ddl
+./tools/testfiles/tpbitsSignedLongLongWhole1.ddl
+./tools/testfiles/tpbitsSignedLongLongWhole63.ddl
+./tools/testfiles/tpbitsOffsetNegative.ddl
+./tools/testfiles/tpbitsUnsigned.ddl
+./tools/testfiles/tpbitsUnsigned2.ddl
+./tools/testfiles/tpbitsUnsigned4.ddl
+./tools/testfiles/tpbitsUnsignedWhole.ddl
+./tools/testfiles/tpbitsUnsignedInt.ddl
+./tools/testfiles/tpbitsUnsignedInt4.ddl
+./tools/testfiles/tpbitsUnsignedInt8.ddl
+./tools/testfiles/tpbitsUnsignedIntWhole.ddl
+./tools/testfiles/tpbitsUnsignedLong.ddl
+./tools/testfiles/tpbitsUnsignedLong8.ddl
+./tools/testfiles/tpbitsUnsignedLong16.ddl
+./tools/testfiles/tpbitsUnsignedLongWhole.ddl
+./tools/testfiles/tpbitsUnsignedLongLong.ddl
+./tools/testfiles/tpbitsUnsignedLongLong16.ddl
+./tools/testfiles/tpbitsUnsignedLongLong32.ddl
+./tools/testfiles/tpbitsUnsignedLongLongWhole.ddl
+./tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl
+./tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl
+./tools/testfiles/tpbitsMax.ddl
+./tools/testfiles/packedbits.h5
+./tools/testfiles/tpbitsArray.ddl
+./tools/testfiles/tpbitsCompound.ddl
+./tools/testfiles/tpbitsIncomplete.ddl
+./tools/testfiles/tpbitsLengthExceeded.ddl
+./tools/testfiles/tpbitsCharLengthExceeded.ddl
+./tools/testfiles/tpbitsIntLengthExceeded.ddl
+./tools/testfiles/tpbitsLongLengthExceeded.ddl
+./tools/testfiles/tpbitsOffsetExceeded.ddl
+./tools/testfiles/tpbitsCharOffsetExceeded.ddl
+./tools/testfiles/tpbitsIntOffsetExceeded.ddl
+./tools/testfiles/tpbitsLongOffsetExceeded.ddl
+./tools/testfiles/tpbitsOverlapped.ddl
# h5dump h5import validation
./tools/testfiles/out3.h5import
./tools/testfiles/tordergr.h5
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 1d76a4a..db6b3b4 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -262,6 +262,7 @@ CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" H5_HAVE_SYS_TIMEB_H)
CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" H5_HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE_CONCAT ("unistd.h" H5_HAVE_UNISTD_H)
CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" H5_HAVE_STDLIB_H)
+CHECK_INCLUDE_FILE_CONCAT ("memory.h" H5_HAVE_MEMORY_H)
CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" H5_HAVE_DLFCN_H)
CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H)
CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" H5_HAVE_INTTYPES_H)
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index df9c3a8..c0d78a7 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -270,6 +270,9 @@
/* Define to 1 if you have the `lstat' function. */
#cmakedefine H5_HAVE_LSTAT @H5_HAVE_LSTAT@
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine H5_HAVE_MEMORY_H @H5_HAVE_MEMORY_H@
+
/* Define if we have MPE support */
#cmakedefine H5_HAVE_MPE @H5_HAVE_MPE@
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index 3375c2b..975a22a 100755
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -24,7 +24,7 @@ SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-SET (HDF5_USE_H5DUMP_PACKED_BITS OFF CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
+SET (HDF5_USE_H5DUMP_PACKED_BITS ON CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
diff --git a/config/cmake/mccacheinit.cmake b/config/cmake/mccacheinit.cmake
index 80ae1f8..f6db602 100755
--- a/config/cmake/mccacheinit.cmake
+++ b/config/cmake/mccacheinit.cmake
@@ -24,7 +24,7 @@ SET (HDF5_ENABLE_SZIP_SUPPORT ON CACHE BOOL "Use SZip Filter" FORCE)
SET (HDF5_ENABLE_SZIP_ENCODING ON CACHE BOOL "Use SZip Encoding" FORCE)
-SET (HDF5_USE_H5DUMP_PACKED_BITS OFF CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
+SET (HDF5_USE_H5DUMP_PACKED_BITS ON CACHE BOOL "Use the PACKED BITS feature in h5dump" FORCE)
SET (HDF5_ENABLE_HSIZET ON CACHE BOOL "Enable datasets larger than memory" FORCE)
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index b367acb..a02388a 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -398,6 +398,80 @@ IF (BUILD_TESTING)
)
ENDIF (WIN32 AND NOT CYGWIN)
+ # --------------------------------------------------------------------
+ # Special option for Packed Bits
+ # --------------------------------------------------------------------
+ IF (HDF5_USE_H5DUMP_PACKED_BITS)
+ #-- Copy all the HDF5 files from the test directory into the source directory
+ SET (HDF5_REFERENCE_PBITS
+ tnofilename-with-packed-bits.ddl
+ tpbitsArray.ddl
+ tpbitsCompound.ddl
+ tpbitsIncomplete.ddl
+ tpbitsLengthExceeded.ddl
+ tpbitsCharLengthExceeded.ddl
+ tpbitsIntLengthExceeded.ddl
+ tpbitsLongLengthExceeded.ddl
+ tpbitsLengthPositive.ddl
+ tpbitsMax.ddl
+ tpbitsMaxExceeded.ddl
+ tpbitsOffsetExceeded.ddl
+ tpbitsCharOffsetExceeded.ddl
+ tpbitsIntOffsetExceeded.ddl
+ tpbitsLongOffsetExceeded.ddl
+ tpbitsOffsetNegative.ddl
+ tpbitsOverlapped.ddl
+ tpbitsSigned.ddl
+ tpbitsUnsigned.ddl
+ tpbitsSignedInt.ddl
+ tpbitsUnsignedInt.ddl
+ tpbitsSignedLong.ddl
+ tpbitsUnsignedLong.ddl
+ tpbitsSignedLongLong.ddl
+ tpbitsUnsignedLongLong.ddl
+ tpbitsSignedWhole.ddl
+ tpbitsUnsignedWhole.ddl
+ tpbitsSignedIntWhole.ddl
+ tpbitsUnsignedIntWhole.ddl
+ tpbitsSignedLongWhole.ddl
+ tpbitsUnsignedLongWhole.ddl
+ tpbitsSignedLongLongWhole.ddl
+ tpbitsUnsignedLongLongWhole.ddl
+ tpbitsSignedLongLongWhole1.ddl
+ tpbitsUnsignedLongLongWhole1.ddl
+ tpbitsSignedLongLongWhole63.ddl
+ tpbitsUnsignedLongLongWhole63.ddl
+ tpbitsSigned4.ddl
+ tpbitsUnsigned4.ddl
+ tpbitsSignedInt8.ddl
+ tpbitsUnsignedInt8.ddl
+ tpbitsSignedLong16.ddl
+ tpbitsUnsignedLong16.ddl
+ tpbitsSignedLongLong32.ddl
+ tpbitsUnsignedLongLong32.ddl
+ tpbitsSigned2.ddl
+ tpbitsUnsigned2.ddl
+ tpbitsSignedInt4.ddl
+ tpbitsUnsignedInt4.ddl
+ tpbitsSignedLong8.ddl
+ tpbitsUnsignedLong8.ddl
+ tpbitsSignedLongLong16.ddl
+ tpbitsUnsignedLongLong16.ddl
+ )
+
+ FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+ SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_pbits}")
+ #MESSAGE (STATUS " Translating ${ddl_pbits}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${XLATE_UTILITY}
+ ARGS ${HDF5_TOOLS_SRC_DIR}/testfiles/${ddl_pbits} ${ddldest} -l3
+ )
+ ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+
+ ENDIF (HDF5_USE_H5DUMP_PACKED_BITS)
+
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
@@ -901,8 +975,10 @@ IF (BUILD_TESTING)
ADD_H5_TEST (tchar1 0 -r tchar.h5)
# test failure handling
- # Missing file name
- ADD_H5_TEST (tnofilename 1)
+ IF (NOT HDF5_USE_H5DUMP_PACKED_BITS)
+ # Missing file name
+ ADD_H5_TEST (tnofilename 1)
+ ENDIF (NOT HDF5_USE_H5DUMP_PACKED_BITS)
# rev. 2004
@@ -1130,17 +1206,196 @@ IF (BUILD_TESTING)
NAME H5DUMP_PACKED_BITS-clearall-objects
COMMAND ${CMAKE_COMMAND}
-E remove
- tpackedbits.out
- tpackedbits.out.err
- tpackedbits2.out
- tpackedbits2.out.err
+ tnofilename-with-packed-bits.out
+ tnofilename-with-packed-bits.out.err
+ tpbitsArray.out
+ tpbitsArray.out.err
+ tpbitsCompound.out
+ tpbitsCompound.out.err
+ tpbitsIncomplete.out
+ tpbitsIncomplete.out.err
+ tpbitsLengthExceeded.out
+ tpbitsLengthExceeded.out.err
+ tpbitsCharLengthExceeded.out
+ tpbitsCharLengthExceeded.out.err
+ tpbitsIntLengthExceeded.out
+ tpbitsIntLengthExceeded.out.err
+ tpbitsLongLengthExceeded.out
+ tpbitsLongLengthExceeded.out.err
+ tpbitsLengthPositive.out
+ tpbitsLengthPositive.out.err
+ tpbitsMax.out
+ tpbitsMax.out.err
+ tpbitsMaxExceeded.out
+ tpbitsMaxExceeded.out.err
+ tpbitsOffsetExceeded.out
+ tpbitsOffsetExceeded.out.err
+ tpbitsCharOffsetExceeded.out
+ tpbitsCharOffsetExceeded.out.err
+ tpbitsIntOffsetExceeded.out
+ tpbitsIntOffsetExceeded.out.err
+ tpbitsLongOffsetExceeded.out
+ tpbitsLongOffsetExceeded.out.err
+ tpbitsOffsetNegative.out
+ tpbitsOffsetNegative.out.err
+ tpbitsOverlapped.out
+ tpbitsOverlapped.out.err
+ tpbitsSigned.out
+ tpbitsSigned.out.err
+ tpbitsUnsigned.out
+ tpbitsUnsigned.out.err
+ tpbitsSignedInt.out
+ tpbitsSignedInt.out.err
+ tpbitsUnsignedInt.out
+ tpbitsUnsignedInt.out.err
+ tpbitsSignedLong.out
+ tpbitsSignedLong.out.err
+ tpbitsUnsignedLong.out
+ tpbitsUnsignedLong.out.err
+ tpbitsSignedLongLong.out
+ tpbitsSignedLongLong.out.err
+ tpbitsUnsignedLongLong.out
+ tpbitsUnsignedLongLong.out.err
+ tpbitsSignedWhole.out
+ tpbitsSignedWhole.out.err
+ tpbitsUnsignedWhole.out
+ tpbitsUnsignedWhole.out.err
+ tpbitsSignedIntWhole.out
+ tpbitsSignedIntWhole.out.err
+ tpbitsUnsignedIntWhole.out
+ tpbitsUnsignedIntWhole.out.err
+ tpbitsSignedLongWhole.out
+ tpbitsSignedLongWhole.out.err
+ tpbitsUnsignedLongWhole.out
+ tpbitsUnsignedLongWhole.out.err
+ tpbitsSignedLongLongWhole.out
+ tpbitsSignedLongLongWhole.out.err
+ tpbitsUnsignedLongLongWhole.out
+ tpbitsUnsignedLongLongWhole.out.err
+ tpbitsSignedLongLongWhole1.out
+ tpbitsSignedLongLongWhole1.out.err
+ tpbitsUnsignedLongLongWhole1.out
+ tpbitsUnsignedLongLongWhole1.out.err
+ tpbitsSignedLongLongWhole63.out
+ tpbitsSignedLongLongWhole63.out.err
+ tpbitsUnsignedLongLongWhole63.out
+ tpbitsUnsignedLongLongWhole63.out.err
+ tpbitsSigned4.out
+ tpbitsSigned4.out.err
+ tpbitsUnsigned4.out
+ tpbitsUnsigned4.out.err
+ tpbitsSignedInt8.out
+ tpbitsSignedInt8.out.err
+ tpbitsUnsignedInt8.out
+ tpbitsUnsignedInt8.out.err
+ tpbitsSignedLong16.out
+ tpbitsSignedLong16.out.err
+ tpbitsUnsignedLong16.out
+ tpbitsUnsignedLong16.out.err
+ tpbitsSignedLongLong32.out
+ tpbitsSignedLongLong32.out.err
+ tpbitsUnsignedLongLong32.out
+ tpbitsUnsignedLongLong32.out.err
+ tpbitsSigned2.out
+ tpbitsSigned2.out.err
+ tpbitsUnsigned2.out
+ tpbitsUnsigned2.out.err
+ tpbitsSignedInt4.out
+ tpbitsSignedInt4.out.err
+ tpbitsUnsignedInt4.out
+ tpbitsUnsignedInt4.out.err
+ tpbitsSignedLong8.out
+ tpbitsSignedLong8.out.err
+ tpbitsUnsignedLong8.out
+ tpbitsUnsignedLong8.out.err
+ tpbitsSignedLongLong16.out
+ tpbitsSignedLongLong16.out.err
+ tpbitsUnsignedLongLong16.out
+ tpbitsUnsignedLongLong16.out.err
)
IF (NOT "${last_test}" STREQUAL "")
SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_test})
ENDIF (NOT "${last_test}" STREQUAL "")
SET (last_test "H5DUMP_PACKED_BITS-clearall-objects")
- ADD_H5_TEST (tpackedbits 0 -d /dset1 -M 0,2 tdset.h5)
- ADD_H5_TEST (tpackedbits2 0 -d /dset1 -M 0,2,2,1 tdset.h5)
+
+ # test failure handling
+ # Missing file name
+ ADD_H5_TEST (tnofilename-with-packed-bits 1)
+ # Limits:
+ # Maximum number of packed bits is 8 (for now).
+ # Maximum integer size is 8*sizeof(long long).
+ # Maximun Offset is Maximum size - 1.
+ # Maximum Offset+Length is Maximum size.
+ # Tests:
+ # Normal operation on both signed and unsigned int datasets.
+ # Sanity check
+ # Their rawdata output should be the same.
+ ADD_H5_TEST (tpbitsSignedWhole 0 -d /DS08BITS -M 0,8 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedWhole 0 -d /DU08BITS -M 0,8 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedIntWhole 0 -d /DS16BITS -M 0,16 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedIntWhole 0 -d /DU16BITS -M 0,16 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLongWhole 0 -d /DS32BITS -M 0,32 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLongWhole 0 -d /DU32BITS -M 0,32 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLongLongWhole 0 -d /DS64BITS -M 0,64 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLongLongWhole 0 -d /DU64BITS -M 0,64 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLongLongWhole63 0 -d /DS64BITS -M 0,63 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLongLongWhole63 0 -d /DU64BITS -M 0,63 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLongLongWhole1 0 -d /DS64BITS -M 1,63 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLongLongWhole1 0 -d /DU64BITS -M 1,63 packedbits.h5)
+ # Half sections
+ ADD_H5_TEST (tpbitsSigned4 0 -d /DS08BITS -M 0,4,4,4 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsigned4 0 -d /DU08BITS -M 0,4,4,4 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedInt8 0 -d /DS16BITS -M 0,8,8,8 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedInt8 0 -d /DU16BITS -M 0,8,8,8 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLong16 0 -d /DS32BITS -M 0,16,16,16 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLong16 0 -d /DU32BITS -M 0,16,16,16 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLongLong32 0 -d /DS64BITS -M 0,32,32,32 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLongLong32 0 -d /DU64BITS -M 0,32,32,32 packedbits.h5)
+ # Quarter sections
+ ADD_H5_TEST (tpbitsSigned2 0 -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsigned2 0 -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedInt4 0 -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedInt4 0 -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLong8 0 -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLong8 0 -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLongLong16 0 -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLongLong16 0 -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
+ # Begin and End
+ ADD_H5_TEST (tpbitsSigned 0 -d /DS08BITS -M 0,2,2,6 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsigned 0 -d /DU08BITS -M 0,2,2,6 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedInt 0 -d /DS16BITS -M 0,2,10,6 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedInt 0 -d /DU16BITS -M 0,2,10,6 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLong 0 -d /DS32BITS -M 0,2,26,6 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLong 0 -d /DU32BITS -M 0,2,26,6 packedbits.h5)
+ ADD_H5_TEST (tpbitsSignedLongLong 0 -d /DS64BITS -M 0,2,58,6 packedbits.h5)
+ ADD_H5_TEST (tpbitsUnsignedLongLong 0 -d /DU64BITS -M 0,2,58,6 packedbits.h5)
+ # Overlapped packed bits.
+ ADD_H5_TEST (tpbitsOverlapped 0 -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5)
+ # Maximum number of packed bits.
+ ADD_H5_TEST (tpbitsMax 0 -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
+ # Compound type.
+ ADD_H5_TEST (tpbitsCompound 0 -d /dset1 -M 0,1,1,1 tcompound.h5)
+ # Array type.
+ ADD_H5_TEST (tpbitsArray 0 -d /Dataset1 -M 0,1,1,1 tarray1.h5)
+ # Test Error handling.
+ # Too many packed bits requested. Max is 8 for now.
+ ADD_H5_TEST (tpbitsMaxExceeded 1 -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
+ # Offset too large. Max is 8*sizeof(long long.
+ ADD_H5_TEST (tpbitsOffsetExceeded 1 -d /DS08BITS -M 64,1 packedbits.h5)
+ ADD_H5_TEST (tpbitsCharOffsetExceeded 0 -d /DS08BITS -M 8,1 packedbits.h5)
+ ADD_H5_TEST (tpbitsIntOffsetExceeded 0 -d /DS16BITS -M 16,1 packedbits.h5)
+ ADD_H5_TEST (tpbitsLongOffsetExceeded 0 -d /DS32BITS -M 32,1 packedbits.h5)
+ # Bad offset, must not be negative.
+ ADD_H5_TEST (tpbitsOffsetNegative 1 -d /DS08BITS -M -1,1 packedbits.h5)
+ # Bad length, must not be positive.
+ ADD_H5_TEST (tpbitsLengthPositive 1 -d /DS08BITS -M 4,0 packedbits.h5)
+ # Offset+Length is too large. Max is 8*sizeof(long long).
+ ADD_H5_TEST (tpbitsLengthExceeded 1 -d /DS08BITS -M 37,28 packedbits.h5)
+ ADD_H5_TEST (tpbitsCharLengthExceeded 0 -d /DS08BITS -M 2,7 packedbits.h5)
+ ADD_H5_TEST (tpbitsIntLengthExceeded 0 -d /DS16BITS -M 10,7 packedbits.h5)
+ ADD_H5_TEST (tpbitsLongLengthExceeded 0 -d /DS32BITS -M 26,7 packedbits.h5)
+ # Incomplete pair of packed bits request.
+ ADD_H5_TEST (tpbitsIncomplete 1 -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5)
ENDIF (HDF5_USE_H5DUMP_PACKED_BITS)
# Remove any output file left over from previous test run
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 64575c2..da6e806 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -93,11 +93,25 @@ static int display_ai = TRUE; /*array index */
static int display_escape = FALSE; /*escape non printable characters */
static int display_region = FALSE; /*print region reference data */
static int enable_error_stack= FALSE; /* re-enable error stack */
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+static int display_packed_bits = FALSE; /*print 1-8 byte numbers as packed bits*/
+#endif
/* sort parameters */
static H5_index_t sort_by = H5_INDEX_NAME; /*sort_by [creation_order | name] */
static H5_iter_order_t sort_order = H5_ITER_INC; /*sort_order [ascending | descending] */
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */
+#define PACKED_BITS_SIZE_MAX 8*sizeof(long long) /* Maximum bits size of integer types of packed-bits */
+/* mask list for packed bits */
+static unsigned long long packed_mask[PACKED_BITS_MAX]; /* packed bits are restricted to 8*sizeof(llong) bytes */
+
+/* packed bits display parameters */
+static int packed_offset[PACKED_BITS_MAX];
+static int packed_length[PACKED_BITS_MAX];
+#endif
+
/**
** Added for XML **
**/
@@ -117,6 +131,9 @@ static int indent; /*how far in to indent the line
/* internal functions */
static hid_t h5_fileaccess(void);
static void dump_oid(hid_t oid);
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+static void dump_packed_bits(unsigned int packed_index, hid_t type);
+#endif
static void print_enum(hid_t type);
static int xml_name_to_XID(const char *, char *, int , int );
static void init_prefix(char **prfx, size_t prfx_len);
@@ -387,7 +404,14 @@ struct handler_t {
* parameters. The long-named ones can be partially spelled. When
* adding more, make sure that they don't clash with each other.
*/
-static const char *s_opts = "hnpeyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:b*F:s:S:Aq:z:m:RE";
+/* The following initialization makes use of C language cancatenating */
+/* "xxx" "yyy" into "xxxyyy". */
+static const char *s_opts = "hnpeyBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:b*F:s:S:Aq:z:m:RE"
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+"M:"
+#endif
+; /* end of *s_opt initialization */
+
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "hel", no_arg, 'h' },
@@ -501,6 +525,9 @@ static struct long_options l_opts[] = {
{ "format", require_arg, 'm' },
{ "region", no_arg, 'R' },
{ "enable-error-stack", no_arg, 'E' },
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ { "packed-bits", require_arg, 'M' },
+#endif
{ NULL, 0, '\0' }
};
@@ -656,6 +683,16 @@ usage(const char *prog)
fprintf(stdout, " -m T, --format=T Set the floating point output format\n");
fprintf(stdout, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n");
fprintf(stdout, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n");
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ fprintf(stdout,
+ " -M L, --packedbits=L Print packed bits as unsigned integers, using mask\n"
+ " format L for an integer dataset specified with\n"
+ " option -d. L is a list of offset,length values,\n"
+ " separated by commas. Offset is the beginning bit in\n"
+ " the data value and length is the number of bits of\n"
+ " the mask.\n"
+ );
+#endif
fprintf(stdout, " -R, --region Print dataset pointed by region references\n");
fprintf(stdout, " -x, --xml Output in XML using Schema\n");
fprintf(stdout, " -u, --use-dtd Output in XML using DTD\n");
@@ -712,6 +749,12 @@ usage(const char *prog)
fprintf(stdout, " using a little-endian type\n");
fprintf(stdout, "\n");
fprintf(stdout, " h5dump -d /dset -b LE -o out.bin quux.h5\n");
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ fprintf(stdout, "\n");
+ fprintf(stdout, " 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " h5dump -d /dset -M 0,1,4,3 quux.h5\n");
+#endif
fprintf(stdout, "\n");
}
@@ -2270,7 +2313,19 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
if(display_dcpl)
dump_dcpl(dcpl_id, type, did);
- if(display_data)
+ if(display_data) {
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ int data_loop = 1;
+ int i;
+ if(display_packed_bits)
+ data_loop = packed_bits_num;
+ for(i=0;i<data_loop;i++) {
+ if(display_packed_bits) {
+ dump_packed_bits(i, type);
+ packed_data_mask = packed_mask[i];
+ packed_data_offset = packed_offset[i];
+ }
+#endif
switch(H5Tget_class(type)) {
case H5T_TIME:
indentation(indent + COL);
@@ -2293,6 +2348,10 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
default:
break;
} /* end switch */
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ } /* for(i=0;i<data_loop;i++) */
+#endif
+ }
indent += COL;
@@ -2672,6 +2731,64 @@ dump_oid(hid_t oid)
indentation(indent + COL);
printf("%s %s %d %s\n", OBJID, BEGIN, oid, END);
}
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+/*-------------------------------------------------------------------------
+ * Function: dump_packed_bits
+ *
+ * Purpose: Prints the packed bits offset and length
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+dump_packed_bits(unsigned int packed_index, hid_t type)
+{
+ int packed_bits_size = 0;
+ hid_t n_type = h5tools_get_native_type(type);
+ if(H5Tget_class(n_type)==H5T_INTEGER) {
+ if(H5Tequal(n_type, H5T_NATIVE_SCHAR) == TRUE) {
+ packed_bits_size = 8 * sizeof(char);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_UCHAR) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned char);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_SHORT) == TRUE) {
+ packed_bits_size = 8 * sizeof(short);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_USHORT) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned short);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_INT) == TRUE) {
+ packed_bits_size = 8 * sizeof(int);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_UINT) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned int);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_LONG) == TRUE) {
+ packed_bits_size = 8 * sizeof(long);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_ULONG) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned long);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_LLONG) == TRUE) {
+ packed_bits_size = 8 * sizeof(long long);
+ }
+ else if(H5Tequal(n_type, H5T_NATIVE_ULLONG) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned long long);
+ }
+ else
+ error_msg("Packed Bit not valid for this datatype");
+ }
+ indentation(indent + COL);
+ if ((packed_bits_size>0) && (packed_offset[packed_index] + packed_length[packed_index]) > packed_bits_size) {
+ error_msg("Packed Bit offset+length value(%d) too large. Max is %d\n",
+ packed_offset[packed_index]+packed_length[packed_index], packed_bits_size);
+ packed_mask[packed_index] = 0;
+ };
+ printf("%s %s=%d %s=%d\n", PACKED_BITS, PACKED_OFFSET, packed_offset[packed_index], PACKED_LENGTH, packed_length[packed_index]);
+}
+#endif
/*-------------------------------------------------------------------------
* Function: dump_comment
@@ -3583,6 +3700,120 @@ parse_subset_params(char *dset)
return s;
}
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+/*-------------------------------------------------------------------------
+ * Function: parse_mask_list
+ *
+ * Purpose: Parse a list of comma or space separated integers and fill
+ * the packed_bits list and counter. The string being passed into this function
+ * should be at the start of the list you want to parse.
+ *
+ * Return: Success: SUCCEED
+ *
+ * Failure: FAIL
+ *
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+parse_mask_list(const char *h_list)
+{
+ const char *ptr;
+ int offset_value, length_value;
+ unsigned long long temp_mask;
+
+ /* sanity check */
+ HDassert(h_list);
+
+ HDmemset(packed_mask,0,sizeof(packed_mask));
+
+ packed_bits_num = 0;
+ /* scan in pair of offset,length separated by commas. */
+ ptr = h_list;
+ while (*ptr) {
+ /* scan for an offset which is an unsigned int */
+ if (!HDisdigit(*ptr)){
+ error_msg("Bad mask list(%s)\n", h_list);
+ return FAIL;
+ }
+ offset_value = HDatoi(ptr);
+ if (offset_value < 0 || offset_value >= PACKED_BITS_SIZE_MAX){
+ error_msg("Packed Bit offset value(%d) must be between 0 and %d\n",
+ offset_value, PACKED_BITS_SIZE_MAX - 1);
+ return FAIL;
+ }
+
+ /* skip to end of integer */
+ while (HDisdigit(*++ptr))
+ ;
+ /* Look for the common separator */
+ if (*ptr++ != ',') {
+ error_msg("Bad mask list(%s), missing expected comma separator.\n", h_list);
+ return FAIL;
+ }
+
+ /* scan for a length which is a positive int */
+ if (!HDisdigit(*ptr)){
+ error_msg("Bad mask list(%s)\n", h_list);
+ return FAIL;
+ }
+ length_value = HDatoi(ptr);
+ if (length_value <= 0){
+ error_msg("Packed Bit length value(%d) must be positive.\n",
+ length_value);
+ return FAIL;
+ };
+ if ((offset_value + length_value) > PACKED_BITS_SIZE_MAX){
+ error_msg("Packed Bit offset+length value(%d) too large. Max is %d\n",
+ offset_value+length_value, PACKED_BITS_SIZE_MAX);
+ return FAIL;
+ };
+
+ /* skip to end of int */
+ while (HDisdigit(*++ptr))
+ ;
+
+ /* store the offset,length pair */
+ if (packed_bits_num >= PACKED_BITS_MAX){
+ /* too many requests */
+ error_msg("Too many masks requested (max. %d). Mask list(%s)\n",
+ PACKED_BITS_MAX, h_list);
+ return FAIL;
+ }
+ packed_offset[packed_bits_num] = offset_value;
+ packed_length[packed_bits_num] = length_value;
+ /* create the bit mask by left shift 1's by length, then negate it. */
+ /* After packed_mask is calculated, packed_length is not needed but */
+ /* keep it for debug purpose. */
+ temp_mask = ~0L;
+ if(length_value<8*sizeof(unsigned long long)) {
+ temp_mask = temp_mask << length_value;
+ packed_mask[packed_bits_num] = ~temp_mask;
+ }
+ else
+ packed_mask[packed_bits_num] = temp_mask;
+ packed_bits_num++;
+
+ /* skip a possible comma separator */
+ if (*ptr == ','){
+ if (!(*++ptr)){
+ /* unexpected end of string */
+ error_msg("Bad mask list(%s), unexpected end of string.\n", h_list);
+ return FAIL;
+ }
+ }
+ }
+ HDassert(packed_bits_num <= PACKED_BITS_MAX);
+ if (packed_bits_num == 0){
+ /* got no masks! */
+ error_msg("Bad mask list(%s)\n", h_list);
+ return FAIL;
+ }
+ return SUCCEED;
+}
+
+#endif
+
/*-------------------------------------------------------------------------
* Function: handle_datasets
*
@@ -4172,6 +4403,21 @@ parse_start:
}
break;
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ case 'M':
+ if (!last_was_dset) {
+ error_msg("option `-%c' can only be used after --dataset option\n",
+ opt);
+ leave(EXIT_FAILURE);
+ }
+ if (parse_mask_list(opt_arg) != SUCCEED){
+ usage(h5tools_getprogname());
+ leave(EXIT_FAILURE);
+ }
+ display_packed_bits = TRUE;
+ break;
+#endif
+
/** begin XML parameters **/
case 'x':
/* select XML output */
diff --git a/tools/h5dump/h5dump.h b/tools/h5dump/h5dump.h
index e16705c..3e34538 100644
--- a/tools/h5dump/h5dump.h
+++ b/tools/h5dump/h5dump.h
@@ -69,6 +69,11 @@
#define EXTERNAL_FILE "EXTERNAL_FILE"
#define FILLVALUE "FILLVALUE"
#define FILE_CONTENTS "FILE_CONTENTS"
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+#define PACKED_BITS "PACKED_BITS"
+#define PACKED_OFFSET "OFFSET"
+#define PACKED_LENGTH "LENGTH"
+#endif
#define BEGIN "{"
#define END "}"
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 9b56f7c..f8da64b 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -23,6 +23,9 @@ USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@"
USE_FILTER_NBIT="@USE_FILTER_NBIT@"
USE_FILTER_SCALEOFFSET="@USE_FILTER_SCALEOFFSET@"
+# Determine if H5dump packed bits feature is included
+Have_Packed_Bits="@PACKED_BITS@"
+
TESTNAME=h5dump
EXIT_SUCCESS=0
EXIT_FAILURE=1
@@ -433,7 +436,11 @@ TOOLTEST tchar1.ddl -r tchar.h5
# test failure handling
# Missing file name
+if test "$Have_Packed_Bits" = "yes"; then
+ TOOLTEST tnofilename-with-packed-bits.ddl
+else
TOOLTEST tnofilename.ddl
+fi
# rev. 2004
@@ -638,6 +645,90 @@ TOOLTEST3 filter_fail.ddl --enable-error-stack filter_fail.h5
# test for -o -y for dataset with attributes
TOOLTEST1 tall-6.ddl -y -o $TESTDIR/data -d /g1/g1.1/dset1.1.1 tall.h5
+# test for dataset packed bits
+# Set up xCMD to test or skip.
+if test "$Have_Packed_Bits" = "yes"; then
+ xCMD=TOOLTEST
+else
+ xCMD=SKIP
+fi
+# Limits:
+# Maximum number of packed bits is 8 (for now).
+# Maximum integer size is 64 (for now).
+# Maximun Offset is 63 (Maximum size - 1).
+# Maximum Offset+Length is 64 (Maximum size).
+# Tests:
+# Normal operation on both signed and unsigned int datasets.
+# Sanity check
+# Their rawdata output should be the same.
+$xCMD tpbitsSignedWhole.ddl -d /DS08BITS -M 0,8 packedbits.h5
+$xCMD tpbitsUnsignedWhole.ddl -d /DU08BITS -M 0,8 packedbits.h5
+$xCMD tpbitsSignedIntWhole.ddl -d /DS16BITS -M 0,16 packedbits.h5
+$xCMD tpbitsUnsignedIntWhole.ddl -d /DU16BITS -M 0,16 packedbits.h5
+$xCMD tpbitsSignedLongWhole.ddl -d /DS32BITS -M 0,32 packedbits.h5
+$xCMD tpbitsUnsignedLongWhole.ddl -d /DU32BITS -M 0,32 packedbits.h5
+$xCMD tpbitsSignedLongLongWhole.ddl -d /DS64BITS -M 0,64 packedbits.h5
+$xCMD tpbitsUnsignedLongLongWhole.ddl -d /DU64BITS -M 0,64 packedbits.h5
+$xCMD tpbitsSignedLongLongWhole63.ddl -d /DS64BITS -M 0,63 packedbits.h5
+$xCMD tpbitsUnsignedLongLongWhole63.ddl -d /DU64BITS -M 0,63 packedbits.h5
+$xCMD tpbitsSignedLongLongWhole1.ddl -d /DS64BITS -M 1,63 packedbits.h5
+$xCMD tpbitsUnsignedLongLongWhole1.ddl -d /DU64BITS -M 1,63 packedbits.h5
+# Half sections
+$xCMD tpbitsSigned4.ddl -d /DS08BITS -M 0,4,4,4 packedbits.h5
+$xCMD tpbitsUnsigned4.ddl -d /DU08BITS -M 0,4,4,4 packedbits.h5
+$xCMD tpbitsSignedInt8.ddl -d /DS16BITS -M 0,8,8,8 packedbits.h5
+$xCMD tpbitsUnsignedInt8.ddl -d /DU16BITS -M 0,8,8,8 packedbits.h5
+$xCMD tpbitsSignedLong16.ddl -d /DS32BITS -M 0,16,16,16 packedbits.h5
+$xCMD tpbitsUnsignedLong16.ddl -d /DU32BITS -M 0,16,16,16 packedbits.h5
+$xCMD tpbitsSignedLongLong32.ddl -d /DS64BITS -M 0,32,32,32 packedbits.h5
+$xCMD tpbitsUnsignedLongLong32.ddl -d /DU64BITS -M 0,32,32,32 packedbits.h5
+# Quarter sections
+$xCMD tpbitsSigned2.ddl -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
+$xCMD tpbitsUnsigned2.ddl -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
+$xCMD tpbitsSignedInt4.ddl -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
+$xCMD tpbitsUnsignedInt4.ddl -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
+$xCMD tpbitsSignedLong8.ddl -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
+$xCMD tpbitsUnsignedLong8.ddl -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
+$xCMD tpbitsSignedLongLong16.ddl -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
+$xCMD tpbitsUnsignedLongLong16.ddl -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
+# Begin and End
+$xCMD tpbitsSigned.ddl -d /DS08BITS -M 0,2,2,6 packedbits.h5
+$xCMD tpbitsUnsigned.ddl -d /DU08BITS -M 0,2,2,6 packedbits.h5
+$xCMD tpbitsSignedInt.ddl -d /DS16BITS -M 0,2,10,6 packedbits.h5
+$xCMD tpbitsUnsignedInt.ddl -d /DU16BITS -M 0,2,10,6 packedbits.h5
+$xCMD tpbitsSignedLong.ddl -d /DS32BITS -M 0,2,26,6 packedbits.h5
+$xCMD tpbitsUnsignedLong.ddl -d /DU32BITS -M 0,2,26,6 packedbits.h5
+$xCMD tpbitsSignedLongLong.ddl -d /DS64BITS -M 0,2,58,6 packedbits.h5
+$xCMD tpbitsUnsignedLongLong.ddl -d /DU64BITS -M 0,2,58,6 packedbits.h5
+# Overlapped packed bits.
+$xCMD tpbitsOverlapped.ddl -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5
+# Maximum number of packed bits.
+$xCMD tpbitsMax.ddl -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
+# Compound type.
+$xCMD tpbitsCompound.ddl -d /dset1 -M 0,1,1,1 tcompound.h5
+# Array type.
+$xCMD tpbitsArray.ddl -d /Dataset1 -M 0,1,1,1 tarray1.h5
+# Test Error handling.
+# Too many packed bits requested. Max is 8 for now.
+$xCMD tpbitsMaxExceeded.ddl -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5
+# Offset too large. Max is 7 (8-1) for now.
+$xCMD tpbitsOffsetExceeded.ddl -d /DS08BITS -M 64,1 packedbits.h5
+$xCMD tpbitsCharOffsetExceeded.ddl -d /DS08BITS -M 8,1 packedbits.h5
+$xCMD tpbitsIntOffsetExceeded.ddl -d /DS16BITS -M 16,1 packedbits.h5
+$xCMD tpbitsLongOffsetExceeded.ddl -d /DS32BITS -M 32,1 packedbits.h5
+# Bad offset, must not be negative.
+$xCMD tpbitsOffsetNegative.ddl -d /DS08BITS -M -1,1 packedbits.h5
+# Bad length, must not be positive.
+$xCMD tpbitsLengthPositive.ddl -d /DS08BITS -M 4,0 packedbits.h5
+# Offset+Length is too large. Max is 8 for now.
+$xCMD tpbitsLengthExceeded.ddl -d /DS08BITS -M 37,28 packedbits.h5
+$xCMD tpbitsCharLengthExceeded.ddl -d /DS08BITS -M 2,7 packedbits.h5
+$xCMD tpbitsIntLengthExceeded.ddl -d /DS16BITS -M 10,7 packedbits.h5
+$xCMD tpbitsLongLengthExceeded.ddl -d /DS32BITS -M 26,7 packedbits.h5
+# Incomplete pair of packed bits request.
+$xCMD tpbitsIncomplete.ddl -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5
+
+
# Report test results and exit
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 3e72bdd..a712794 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -42,6 +42,11 @@ FILE *rawdatastream; /* should initialize to stdout but gcc moans about it
int bin_output; /* binary output */
int bin_form; /* binary form */
int region_output; /* region output */
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+int packed_bits_num; /* number of packed bits to display */
+int packed_data_offset; /* offset of packed bits to display */
+unsigned long long packed_data_mask; /* mask in which packed bits to display */
+#endif
static h5tool_format_t h5tools_dataformat = {
0, /*raw */
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 89e07fa..448a20c 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -530,6 +530,12 @@ struct subset_t {
extern "C" {
#endif
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+H5TOOLS_DLLVAR int packed_bits_num; /* number of packed bits to display */
+H5TOOLS_DLLVAR int packed_data_offset; /* offset of packed bits to display */
+H5TOOLS_DLLVAR unsigned long long packed_data_mask; /* mask in which packed bits to display */
+#endif
+
H5TOOLS_DLLVAR FILE *rawdatastream; /* output stream for raw data */
H5TOOLS_DLLVAR int bin_output; /* binary output */
H5TOOLS_DLLVAR int bin_form; /* binary form */
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index c1c6d72..7630e9a 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -795,44 +795,98 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
}
else if (H5Tequal(type, H5T_NATIVE_INT)) {
HDmemcpy(&tempint, vp, sizeof(int));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ tempint = (tempint >> packed_data_offset) & packed_data_mask;
+ }
+#endif
h5tools_str_append(str, OPT(info->fmt_int, "%d"), tempint);
}
else if (H5Tequal(type, H5T_NATIVE_UINT)) {
HDmemcpy(&tempuint, vp, sizeof(unsigned int));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ tempuint = (tempuint >> packed_data_offset) & packed_data_mask;
+ }
+#endif
h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint);
}
else if (H5Tequal(type, H5T_NATIVE_SCHAR)) {
- h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), *cp_vp);
+ char tempchar;
+ HDmemcpy(&tempchar, cp_vp, sizeof(char));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ tempchar = (tempchar >> packed_data_offset) & packed_data_mask;
+ }
+#endif
+ h5tools_str_append(str, OPT(info->fmt_schar, "%hhd"), tempchar);
}
else if (H5Tequal(type, H5T_NATIVE_UCHAR)) {
- h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), *ucp_vp);
+ unsigned char tempuchar;
+ HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ tempuchar = (tempuchar >> packed_data_offset) & packed_data_mask;
+ }
+#endif
+ h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), tempuchar);
}
else if (H5Tequal(type, H5T_NATIVE_SHORT)) {
short tempshort;
HDmemcpy(&tempshort, vp, sizeof(short));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ tempshort = (tempshort >> packed_data_offset) & packed_data_mask;
+ }
+#endif
h5tools_str_append(str, OPT(info->fmt_short, "%d"), tempshort);
}
else if (H5Tequal(type, H5T_NATIVE_USHORT)) {
unsigned short tempushort;
HDmemcpy(&tempushort, vp, sizeof(unsigned short));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ tempushort = (tempushort >> packed_data_offset) & packed_data_mask;
+ }
+#endif
h5tools_str_append(str, OPT(info->fmt_ushort, "%u"), tempushort);
}
else if (H5Tequal(type, H5T_NATIVE_LONG)) {
HDmemcpy(&templong, vp, sizeof(long));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ templong = (templong >> packed_data_offset) & packed_data_mask;
+ }
+#endif
h5tools_str_append(str, OPT(info->fmt_long, "%ld"), templong);
}
else if (H5Tequal(type, H5T_NATIVE_ULONG)) {
HDmemcpy(&tempulong, vp, sizeof(unsigned long));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ tempulong = (tempulong >> packed_data_offset) & packed_data_mask;
+ }
+#endif
h5tools_str_append(str, OPT(info->fmt_ulong, "%lu"), tempulong);
}
else if (H5Tequal(type, H5T_NATIVE_LLONG)) {
HDmemcpy(&templlong, vp, sizeof(long long));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ templlong = (templlong >> packed_data_offset) & packed_data_mask;
+ }
+#endif
h5tools_str_append(str, OPT(info->fmt_llong, fmt_llong), templlong);
}
else if (H5Tequal(type, H5T_NATIVE_ULLONG)) {
HDmemcpy(&tempullong, vp, sizeof(unsigned long long));
+#ifdef H5_HAVE_H5DUMP_PACKED_BITS
+ if(packed_bits_num) {
+ tempullong = (tempullong >> packed_data_offset) & packed_data_mask;
+ }
+#endif
h5tools_str_append(str, OPT(info->fmt_ullong, fmt_ullong), tempullong);
}
else if (H5Tequal(type, H5T_NATIVE_HSSIZE)) {
diff --git a/tools/testfiles/tnofilename-with-packed-bits.ddl b/tools/testfiles/tnofilename-with-packed-bits.ddl
new file mode 100644
index 0000000..310327e
--- /dev/null
+++ b/tools/testfiles/tnofilename-with-packed-bits.ddl
@@ -0,0 +1,97 @@
+#############################
+Expected output for 'h5dump '
+#############################
+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 L, --packedbits=L Print packed bits as unsigned integers, using mask
+ format L for an integer dataset specified with
+ option -d. L is a list of offset,length values,
+ separated by commas. Offset is the beginning bit in
+ the data value and length is the number of bits of
+ the mask.
+ -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
+ --enable-error-stack Prints messages from the HDF5 error stack as they
+ occur.
+
+ 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)
+
+ 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
+
+ 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset
+
+ h5dump -d /dset -M 0,1,4,3 quux.h5
+
diff --git a/tools/testfiles/tpbitsArray.ddl b/tools/testfiles/tpbitsArray.ddl
new file mode 100644
index 0000000..a20cbb2
--- /dev/null
+++ b/tools/testfiles/tpbitsArray.ddl
@@ -0,0 +1,17 @@
+#############################
+Expected output for 'h5dump -d /Dataset1 -M 0,1,1,1 tarray1.h5'
+#############################
+HDF5 "tarray1.h5" {
+DATASET "/Dataset1" {
+ DATATYPE H5T_ARRAY { [4] H5T_STD_I32LE }
+ DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
+ PACKED_BITS OFFSET=0 LENGTH=1
+ DATA {
+ (0): [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ], [ 0, 1, 0, 1 ]
+ }
+ PACKED_BITS OFFSET=1 LENGTH=1
+ DATA {
+ (0): [ 0, 0, 1, 1 ], [ 1, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 1, 1, 0, 0 ]
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsCharLengthExceeded.ddl b/tools/testfiles/tpbitsCharLengthExceeded.ddl
new file mode 100644
index 0000000..6a72590
--- /dev/null
+++ b/tools/testfiles/tpbitsCharLengthExceeded.ddl
@@ -0,0 +1,21 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 2,7 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=2 LENGTH=7
+ DATA {
+ (0,0): 0, 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
+ }
+}
+}
+h5dump error: Packed Bit offset+length value(9) too large. Max is 8
diff --git a/tools/testfiles/tpbitsCharOffsetExceeded.ddl b/tools/testfiles/tpbitsCharOffsetExceeded.ddl
new file mode 100644
index 0000000..6543345
--- /dev/null
+++ b/tools/testfiles/tpbitsCharOffsetExceeded.ddl
@@ -0,0 +1,21 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 8,1 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=8 LENGTH=1
+ DATA {
+ (0,0): 0, 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
+ }
+}
+}
+h5dump error: Packed Bit offset+length value(9) too large. Max is 8
diff --git a/tools/testfiles/tpbitsCompound.ddl b/tools/testfiles/tpbitsCompound.ddl
new file mode 100644
index 0000000..87df46f
--- /dev/null
+++ b/tools/testfiles/tpbitsCompound.ddl
@@ -0,0 +1,69 @@
+#############################
+Expected output for 'h5dump -d /dset1 -M 0,1,1,1 tcompound.h5'
+#############################
+HDF5 "tcompound.h5" {
+DATASET "/dset1" {
+ DATATYPE H5T_COMPOUND {
+ H5T_STD_I32BE "a_name";
+ H5T_IEEE_F32BE "b_name";
+ H5T_IEEE_F64BE "c_name";
+ }
+ DATASPACE SIMPLE { ( 5 ) / ( 5 ) }
+ PACKED_BITS OFFSET=0 LENGTH=1
+ DATA {
+ (0): {
+ 0,
+ 0,
+ 1
+ },
+ (1): {
+ 1,
+ 1,
+ 0.5
+ },
+ (2): {
+ 0,
+ 4,
+ 0.333333
+ },
+ (3): {
+ 1,
+ 9,
+ 0.25
+ },
+ (4): {
+ 0,
+ 16,
+ 0.2
+ }
+ }
+ PACKED_BITS OFFSET=1 LENGTH=1
+ DATA {
+ (0): {
+ 0,
+ 0,
+ 1
+ },
+ (1): {
+ 0,
+ 1,
+ 0.5
+ },
+ (2): {
+ 1,
+ 4,
+ 0.333333
+ },
+ (3): {
+ 1,
+ 9,
+ 0.25
+ },
+ (4): {
+ 0,
+ 16,
+ 0.2
+ }
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsIncomplete.ddl b/tools/testfiles/tpbitsIncomplete.ddl
new file mode 100644
index 0000000..fca66e5
--- /dev/null
+++ b/tools/testfiles/tpbitsIncomplete.ddl
@@ -0,0 +1,98 @@
+#############################
+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 L, --packedbits=L Print packed bits as unsigned integers, using mask
+ format L for an integer dataset specified with
+ option -d. L is a list of offset,length values,
+ separated by commas. Offset is the beginning bit in
+ the data value and length is the number of bits of
+ the mask.
+ -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
+ --enable-error-stack Prints messages from the HDF5 error stack as they
+ occur.
+
+ 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)
+
+ 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
+
+ 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset
+
+ h5dump -d /dset -M 0,1,4,3 quux.h5
+
+h5dump error: Bad mask list(0,2,2,1,0,2,2,)
diff --git a/tools/testfiles/tpbitsIntLengthExceeded.ddl b/tools/testfiles/tpbitsIntLengthExceeded.ddl
new file mode 100644
index 0000000..0b74575
--- /dev/null
+++ b/tools/testfiles/tpbitsIntLengthExceeded.ddl
@@ -0,0 +1,21 @@
+#############################
+Expected output for 'h5dump -d /DS16BITS -M 10,7 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS16BITS" {
+ DATATYPE H5T_STD_I16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=10 LENGTH=7
+ DATA {
+ (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
+h5dump error: Packed Bit offset+length value(17) too large. Max is 16
diff --git a/tools/testfiles/tpbitsIntOffsetExceeded.ddl b/tools/testfiles/tpbitsIntOffsetExceeded.ddl
new file mode 100644
index 0000000..fa41c21
--- /dev/null
+++ b/tools/testfiles/tpbitsIntOffsetExceeded.ddl
@@ -0,0 +1,21 @@
+#############################
+Expected output for 'h5dump -d /DS16BITS -M 16,1 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS16BITS" {
+ DATATYPE H5T_STD_I16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=16 LENGTH=1
+ DATA {
+ (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
+h5dump error: Packed Bit offset+length value(17) too large. Max is 16
diff --git a/tools/testfiles/tpbitsLengthExceeded.ddl b/tools/testfiles/tpbitsLengthExceeded.ddl
new file mode 100644
index 0000000..f9a4413
--- /dev/null
+++ b/tools/testfiles/tpbitsLengthExceeded.ddl
@@ -0,0 +1,98 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 37,28 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 L, --packedbits=L Print packed bits as unsigned integers, using mask
+ format L for an integer dataset specified with
+ option -d. L is a list of offset,length values,
+ separated by commas. Offset is the beginning bit in
+ the data value and length is the number of bits of
+ the mask.
+ -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
+ --enable-error-stack Prints messages from the HDF5 error stack as they
+ occur.
+
+ 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)
+
+ 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
+
+ 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset
+
+ h5dump -d /dset -M 0,1,4,3 quux.h5
+
+h5dump error: Packed Bit offset+length value(65) too large. Max is 64
diff --git a/tools/testfiles/tpbitsLengthPositive.ddl b/tools/testfiles/tpbitsLengthPositive.ddl
new file mode 100644
index 0000000..ee9916b
--- /dev/null
+++ b/tools/testfiles/tpbitsLengthPositive.ddl
@@ -0,0 +1,98 @@
+#############################
+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 L, --packedbits=L Print packed bits as unsigned integers, using mask
+ format L for an integer dataset specified with
+ option -d. L is a list of offset,length values,
+ separated by commas. Offset is the beginning bit in
+ the data value and length is the number of bits of
+ the mask.
+ -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
+ --enable-error-stack Prints messages from the HDF5 error stack as they
+ occur.
+
+ 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)
+
+ 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
+
+ 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset
+
+ h5dump -d /dset -M 0,1,4,3 quux.h5
+
+h5dump error: Packed Bit length value(0) must be positive.
diff --git a/tools/testfiles/tpbitsLongLengthExceeded.ddl b/tools/testfiles/tpbitsLongLengthExceeded.ddl
new file mode 100644
index 0000000..edb4aa7
--- /dev/null
+++ b/tools/testfiles/tpbitsLongLengthExceeded.ddl
@@ -0,0 +1,29 @@
+#############################
+Expected output for 'h5dump -d /DS32BITS -M 26,7 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS32BITS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=26 LENGTH=7
+ DATA {
+ (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
+h5dump error: Packed Bit offset+length value(33) too large. Max is 32
diff --git a/tools/testfiles/tpbitsLongOffsetExceeded.ddl b/tools/testfiles/tpbitsLongOffsetExceeded.ddl
new file mode 100644
index 0000000..c556644
--- /dev/null
+++ b/tools/testfiles/tpbitsLongOffsetExceeded.ddl
@@ -0,0 +1,29 @@
+#############################
+Expected output for 'h5dump -d /DS32BITS -M 32,1 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS32BITS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=32 LENGTH=1
+ DATA {
+ (0,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
+h5dump error: Packed Bit offset+length value(33) too large. Max is 32
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..7a1c0fe
--- /dev/null
+++ b/tools/testfiles/tpbitsMaxExceeded.ddl
@@ -0,0 +1,98 @@
+#############################
+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 L, --packedbits=L Print packed bits as unsigned integers, using mask
+ format L for an integer dataset specified with
+ option -d. L is a list of offset,length values,
+ separated by commas. Offset is the beginning bit in
+ the data value and length is the number of bits of
+ the mask.
+ -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
+ --enable-error-stack Prints messages from the HDF5 error stack as they
+ occur.
+
+ 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)
+
+ 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
+
+ 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset
+
+ h5dump -d /dset -M 0,1,4,3 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..3d7bb56
--- /dev/null
+++ b/tools/testfiles/tpbitsOffsetExceeded.ddl
@@ -0,0 +1,98 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 64,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 L, --packedbits=L Print packed bits as unsigned integers, using mask
+ format L for an integer dataset specified with
+ option -d. L is a list of offset,length values,
+ separated by commas. Offset is the beginning bit in
+ the data value and length is the number of bits of
+ the mask.
+ -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
+ --enable-error-stack Prints messages from the HDF5 error stack as they
+ occur.
+
+ 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)
+
+ 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
+
+ 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset
+
+ h5dump -d /dset -M 0,1,4,3 quux.h5
+
+h5dump error: Packed Bit offset value(64) must be between 0 and 63
diff --git a/tools/testfiles/tpbitsOffsetNegative.ddl b/tools/testfiles/tpbitsOffsetNegative.ddl
new file mode 100644
index 0000000..a4fc444
--- /dev/null
+++ b/tools/testfiles/tpbitsOffsetNegative.ddl
@@ -0,0 +1,98 @@
+#############################
+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 L, --packedbits=L Print packed bits as unsigned integers, using mask
+ format L for an integer dataset specified with
+ option -d. L is a list of offset,length values,
+ separated by commas. Offset is the beginning bit in
+ the data value and length is the number of bits of
+ the mask.
+ -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
+ --enable-error-stack Prints messages from the HDF5 error stack as they
+ occur.
+
+ 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)
+
+ 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
+
+ 4) Display two packed bits (bits 0-1 and bits 4-6) in the dataset /dset
+
+ h5dump -d /dset -M 0,1,4,3 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/tpbitsSigned2.ddl b/tools/testfiles/tpbitsSigned2.ddl
new file mode 100644
index 0000000..60981e7
--- /dev/null
+++ b/tools/testfiles/tpbitsSigned2.ddl
@@ -0,0 +1,53 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 0,2,2,2,4,2,6,2 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=2
+ DATA {
+ (0,0): 3, 3, 3, 2, 0, 0, 0, 0,
+ (1,0): 3, 3, 2, 0, 0, 0, 0, 0,
+ (2,0): 3, 2, 0, 0, 0, 0, 0, 0,
+ (3,0): 2, 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=2
+ DATA {
+ (0,0): 3, 3, 3, 3, 3, 2, 0, 0,
+ (1,0): 3, 3, 3, 3, 2, 0, 0, 0,
+ (2,0): 3, 3, 3, 2, 0, 0, 0, 0,
+ (3,0): 3, 3, 2, 0, 0, 0, 0, 0,
+ (4,0): 3, 2, 0, 0, 0, 0, 0, 0,
+ (5,0): 2, 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=2
+ DATA {
+ (0,0): 3, 3, 3, 3, 3, 3, 3, 2,
+ (1,0): 3, 3, 3, 3, 3, 3, 2, 0,
+ (2,0): 3, 3, 3, 3, 3, 2, 0, 0,
+ (3,0): 3, 3, 3, 3, 2, 0, 0, 0,
+ (4,0): 3, 3, 3, 2, 0, 0, 0, 0,
+ (5,0): 3, 3, 2, 0, 0, 0, 0, 0,
+ (6,0): 3, 2, 0, 0, 0, 0, 0, 0,
+ (7,0): 2, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSigned4.ddl b/tools/testfiles/tpbitsSigned4.ddl
new file mode 100644
index 0000000..70038ff
--- /dev/null
+++ b/tools/testfiles/tpbitsSigned4.ddl
@@ -0,0 +1,31 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 0,4,4,4 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=0 LENGTH=4
+ DATA {
+ (0,0): 15, 14, 12, 8, 0, 0, 0, 0,
+ (1,0): 14, 12, 8, 0, 0, 0, 0, 0,
+ (2,0): 12, 8, 0, 0, 0, 0, 0, 0,
+ (3,0): 8, 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=4
+ DATA {
+ (0,0): 15, 15, 15, 15, 15, 14, 12, 8,
+ (1,0): 15, 15, 15, 15, 14, 12, 8, 0,
+ (2,0): 15, 15, 15, 14, 12, 8, 0, 0,
+ (3,0): 15, 15, 14, 12, 8, 0, 0, 0,
+ (4,0): 15, 14, 12, 8, 0, 0, 0, 0,
+ (5,0): 14, 12, 8, 0, 0, 0, 0, 0,
+ (6,0): 12, 8, 0, 0, 0, 0, 0, 0,
+ (7,0): 8, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedInt.ddl b/tools/testfiles/tpbitsSignedInt.ddl
new file mode 100644
index 0000000..05e5e6d
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedInt.ddl
@@ -0,0 +1,31 @@
+#############################
+Expected output for 'h5dump -d /DS16BITS -M 0,2,10,6 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS16BITS" {
+ DATATYPE H5T_STD_I16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=0 LENGTH=2
+ DATA {
+ (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=10 LENGTH=6
+ DATA {
+ (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32,
+ (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0,
+ (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0,
+ (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0,
+ (4,0): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0,
+ (5,0): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0,
+ (6,0): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0,
+ (7,0): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedInt4.ddl b/tools/testfiles/tpbitsSignedInt4.ddl
new file mode 100644
index 0000000..11270ff
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedInt4.ddl
@@ -0,0 +1,53 @@
+#############################
+Expected output for 'h5dump -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS16BITS" {
+ DATATYPE H5T_STD_I16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=0 LENGTH=4
+ DATA {
+ (0,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=4 LENGTH=4
+ DATA {
+ (0,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=8 LENGTH=4
+ DATA {
+ (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0,
+ (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0,
+ (2,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0,
+ (3,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=12 LENGTH=4
+ DATA {
+ (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8,
+ (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0,
+ (2,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0,
+ (3,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0,
+ (4,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0,
+ (5,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0,
+ (6,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0,
+ (7,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedInt8.ddl b/tools/testfiles/tpbitsSignedInt8.ddl
new file mode 100644
index 0000000..e7cf0f3
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedInt8.ddl
@@ -0,0 +1,37 @@
+#############################
+Expected output for 'h5dump -d /DS16BITS -M 0,8,8,8 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS16BITS" {
+ DATATYPE H5T_STD_I16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=0 LENGTH=8
+ DATA {
+ (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=8 LENGTH=8
+ DATA {
+ (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240,
+ (0,13): 224, 192, 128,
+ (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224,
+ (1,13): 192, 128, 0,
+ (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192,
+ (2,13): 128, 0, 0,
+ (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0,
+ (3,14): 0, 0,
+ (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0,
+ (4,14): 0, 0,
+ (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0,
+ (5,15): 0,
+ (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0,
+ (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedIntWhole.ddl b/tools/testfiles/tpbitsSignedIntWhole.ddl
new file mode 100644
index 0000000..589452e
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedIntWhole.ddl
@@ -0,0 +1,28 @@
+#############################
+Expected output for 'h5dump -d /DS16BITS -M 0,16 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS16BITS" {
+ DATATYPE H5T_STD_I16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=0 LENGTH=16
+ DATA {
+ (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048,
+ (0,12): -4096, -8192, -16384, -32768,
+ (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ (1,12): -8192, -16384, -32768, 0,
+ (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ (2,11): -8192, -16384, -32768, 0, 0,
+ (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ (3,11): -16384, -32768, 0, 0, 0,
+ (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ (4,10): -16384, -32768, 0, 0, 0, 0,
+ (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ (5,10): -32768, 0, 0, 0, 0, 0,
+ (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ (6,10): 0, 0, 0, 0, 0, 0,
+ (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768, 0, 0,
+ (7,11): 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLong.ddl b/tools/testfiles/tpbitsSignedLong.ddl
new file mode 100644
index 0000000..fe95ec5
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLong.ddl
@@ -0,0 +1,47 @@
+#############################
+Expected output for 'h5dump -d /DS32BITS -M 0,2,26,6 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS32BITS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=0 LENGTH=2
+ DATA {
+ (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=26 LENGTH=6
+ DATA {
+ (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32,
+ (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0,
+ (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0,
+ (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,17): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0,
+ (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,17): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0,
+ (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (5,17): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0,
+ (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (6,17): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0,
+ (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (7,17): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLong16.ddl b/tools/testfiles/tpbitsSignedLong16.ddl
new file mode 100644
index 0000000..0d4ff6b
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLong16.ddl
@@ -0,0 +1,70 @@
+#############################
+Expected output for 'h5dump -d /DS32BITS -M 0,16,16,16 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS32BITS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=0 LENGTH=16
+ DATA {
+ (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,25): 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,26): 0, 0, 0, 0, 0, 0,
+ (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,27): 0, 0, 0, 0, 0,
+ (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,29): 0, 0, 0,
+ (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,30): 0, 0,
+ (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=16 LENGTH=16
+ DATA {
+ (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (0,27): 63488, 61440, 57344, 49152, 32768,
+ (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532,
+ (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (1,27): 61440, 57344, 49152, 32768, 0,
+ (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528,
+ (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (2,27): 57344, 49152, 32768, 0, 0,
+ (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520,
+ (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (3,27): 49152, 32768, 0, 0, 0,
+ (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504,
+ (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (4,27): 32768, 0, 0, 0, 0,
+ (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472,
+ (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (5,28): 0, 0, 0, 0,
+ (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408,
+ (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ (6,29): 0, 0, 0,
+ (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (7,31): 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLong8.ddl b/tools/testfiles/tpbitsSignedLong8.ddl
new file mode 100644
index 0000000..53039d8
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLong8.ddl
@@ -0,0 +1,99 @@
+#############################
+Expected output for 'h5dump -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS32BITS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=0 LENGTH=8
+ DATA {
+ (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,17): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,19): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=8 LENGTH=8
+ DATA {
+ (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240,
+ (0,13): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224,
+ (1,13): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192,
+ (2,13): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0,
+ (3,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0,
+ (4,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0,
+ (5,15): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0,
+ (6,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0,
+ (7,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=16 LENGTH=8
+ DATA {
+ (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (0,13): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0,
+ (0,28): 0, 0, 0, 0,
+ (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (1,13): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0,
+ (1,28): 0, 0, 0, 0,
+ (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (2,13): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0,
+ (2,29): 0, 0, 0,
+ (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (3,13): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,30): 0, 0,
+ (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (4,13): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,30): 0, 0,
+ (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254,
+ (5,13): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,31): 0,
+ (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252,
+ (6,13): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248,
+ (7,13): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=24 LENGTH=8
+ DATA {
+ (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (0,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254,
+ (0,26): 252, 248, 240, 224, 192, 128,
+ (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (1,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252,
+ (1,26): 248, 240, 224, 192, 128, 0,
+ (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (2,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248,
+ (2,26): 240, 224, 192, 128, 0, 0,
+ (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (3,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240,
+ (3,26): 224, 192, 128, 0, 0, 0,
+ (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (4,13): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224,
+ (4,26): 192, 128, 0, 0, 0, 0,
+ (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (5,13): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192,
+ (5,26): 128, 0, 0, 0, 0, 0,
+ (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (6,13): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128,
+ (6,26): 0, 0, 0, 0, 0, 0,
+ (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (7,13): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0,
+ (7,27): 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLongLong.ddl b/tools/testfiles/tpbitsSignedLongLong.ddl
new file mode 100644
index 0000000..b66791b
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLongLong.ddl
@@ -0,0 +1,71 @@
+#############################
+Expected output for 'h5dump -d /DS64BITS -M 0,2,58,6 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS64BITS" {
+ DATATYPE H5T_STD_I64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=2
+ DATA {
+ (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=58 LENGTH=6
+ DATA {
+ (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (0,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (0,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32,
+ (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (1,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (1,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0,
+ (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (2,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (2,49): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0,
+ (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,49): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0,
+ (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,49): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0,
+ (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (5,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (5,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (5,49): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0,
+ (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (6,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (6,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (6,49): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0,
+ (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (7,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (7,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (7,49): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLongLong16.ddl b/tools/testfiles/tpbitsSignedLongLong16.ddl
new file mode 100644
index 0000000..8d8c125
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLongLong16.ddl
@@ -0,0 +1,199 @@
+#############################
+Expected output for 'h5dump -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS64BITS" {
+ DATATYPE H5T_STD_I64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=16
+ DATA {
+ (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,25): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,26): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,30): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,52): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=16 LENGTH=16
+ DATA {
+ (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (0,27): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532,
+ (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (1,27): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528,
+ (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (2,27): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520,
+ (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (3,27): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504,
+ (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (4,27): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472,
+ (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (5,28): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408,
+ (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ (6,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (7,31): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,53): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=32 LENGTH=16
+ DATA {
+ (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528,
+ (0,36): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (0,45): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,63): 0,
+ (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,27): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520,
+ (1,36): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (1,45): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,27): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504,
+ (2,36): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (2,45): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,27): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472,
+ (3,36): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,27): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408,
+ (4,36): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ (4,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,27): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (5,36): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (5,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,27): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (6,36): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ (7,27): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (7,36): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=48 LENGTH=16
+ DATA {
+ (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,45): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504,
+ (0,54): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (0,63): 32768,
+ (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,45): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472,
+ (1,54): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,45): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408,
+ (2,54): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0,
+ (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,45): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (3,54): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,45): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (4,54): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0,
+ (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ (5,45): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (5,54): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0,
+ (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532,
+ (6,45): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (6,54): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,36): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528,
+ (7,45): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (7,54): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLongLong32.ddl b/tools/testfiles/tpbitsSignedLongLong32.ddl
new file mode 100644
index 0000000..d88a6ed
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLongLong32.ddl
@@ -0,0 +1,178 @@
+#############################
+Expected output for 'h5dump -d /DS64BITS -M 0,32,32,32 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS64BITS" {
+ DATATYPE H5T_STD_I64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=32
+ DATA {
+ (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280,
+ (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (0,30): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ (1,30): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0,
+ (2,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0,
+ (3,35): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,57): 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,38): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,60): 0, 0, 0, 0,
+ (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,41): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,63): 0,
+ (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ (6,25): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0,
+ (7,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=32 LENGTH=32
+ DATA {
+ (0,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,30): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292,
+ (0,35): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ (0,40): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ (0,45): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ (0,50): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ (0,55): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ (0,60): 4026531840, 3758096384, 3221225472, 2147483648,
+ (1,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,30): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288,
+ (1,35): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ (1,40): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ (1,45): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ (1,50): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ (1,55): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ (1,60): 3758096384, 3221225472, 2147483648, 0,
+ (2,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,30): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280,
+ (2,35): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (2,40): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (2,45): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (2,50): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (2,55): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (2,60): 3221225472, 2147483648, 0, 0,
+ (3,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,30): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ (3,35): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ (3,40): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ (3,45): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ (3,50): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ (3,55): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ (3,60): 2147483648, 0, 0, 0,
+ (4,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967294,
+ (4,30): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ (4,35): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ (4,40): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ (4,45): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ (4,50): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ (4,55): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0,
+ (4,62): 0, 0,
+ (5,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,25): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292,
+ (5,30): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ (5,35): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ (5,40): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ (5,45): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ (5,50): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ (5,55): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0,
+ (6,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,25): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288,
+ (6,30): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ (6,35): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ (6,40): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ (6,45): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ (6,50): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ (6,55): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0,
+ (7,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,25): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280,
+ (7,30): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (7,35): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (7,40): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (7,45): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (7,50): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (7,55): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLongLongWhole.ddl b/tools/testfiles/tpbitsSignedLongLongWhole.ddl
new file mode 100644
index 0000000..51732c2
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLongLongWhole.ddl
@@ -0,0 +1,124 @@
+#############################
+Expected output for 'h5dump -d /DS64BITS -M 0,64 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS64BITS" {
+ DATATYPE H5T_STD_I64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=64
+ DATA {
+ (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048,
+ (0,12): -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288,
+ (0,20): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432,
+ (0,26): -67108864, -134217728, -268435456, -536870912, -1073741824,
+ (0,31): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368,
+ (0,36): -68719476736, -137438953472, -274877906944, -549755813888,
+ (0,40): -1099511627776, -2199023255552, -4398046511104, -8796093022208,
+ (0,44): -17592186044416, -35184372088832, -70368744177664,
+ (0,47): -140737488355328, -281474976710656, -562949953421312,
+ (0,50): -1125899906842624, -2251799813685248, -4503599627370496,
+ (0,53): -9007199254740992, -18014398509481984, -36028797018963968,
+ (0,56): -72057594037927936, -144115188075855872, -288230376151711744,
+ (0,59): -576460752303423488, -1152921504606846976, -2305843009213693952,
+ (0,62): -4611686018427387904, -9223372036854775808,
+ (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ (1,12): -8192, -16384, -32768, -65536, -131072, -262144, -524288,
+ (1,19): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432,
+ (1,25): -67108864, -134217728, -268435456, -536870912, -1073741824,
+ (1,30): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368,
+ (1,35): -68719476736, -137438953472, -274877906944, -549755813888,
+ (1,39): -1099511627776, -2199023255552, -4398046511104, -8796093022208,
+ (1,43): -17592186044416, -35184372088832, -70368744177664,
+ (1,46): -140737488355328, -281474976710656, -562949953421312,
+ (1,49): -1125899906842624, -2251799813685248, -4503599627370496,
+ (1,52): -9007199254740992, -18014398509481984, -36028797018963968,
+ (1,55): -72057594037927936, -144115188075855872, -288230376151711744,
+ (1,58): -576460752303423488, -1152921504606846976, -2305843009213693952,
+ (1,61): -4611686018427387904, -9223372036854775808, 0,
+ (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ (2,11): -8192, -16384, -32768, -65536, -131072, -262144, -524288,
+ (2,18): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432,
+ (2,24): -67108864, -134217728, -268435456, -536870912, -1073741824,
+ (2,29): -2147483648, -4294967296, -8589934592, -17179869184, -34359738368,
+ (2,34): -68719476736, -137438953472, -274877906944, -549755813888,
+ (2,38): -1099511627776, -2199023255552, -4398046511104, -8796093022208,
+ (2,42): -17592186044416, -35184372088832, -70368744177664,
+ (2,45): -140737488355328, -281474976710656, -562949953421312,
+ (2,48): -1125899906842624, -2251799813685248, -4503599627370496,
+ (2,51): -9007199254740992, -18014398509481984, -36028797018963968,
+ (2,54): -72057594037927936, -144115188075855872, -288230376151711744,
+ (2,57): -576460752303423488, -1152921504606846976, -2305843009213693952,
+ (2,60): -4611686018427387904, -9223372036854775808, 0, 0,
+ (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ (3,11): -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ (3,18): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ (3,24): -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ (3,29): -4294967296, -8589934592, -17179869184, -34359738368,
+ (3,33): -68719476736, -137438953472, -274877906944, -549755813888,
+ (3,37): -1099511627776, -2199023255552, -4398046511104, -8796093022208,
+ (3,41): -17592186044416, -35184372088832, -70368744177664,
+ (3,44): -140737488355328, -281474976710656, -562949953421312,
+ (3,47): -1125899906842624, -2251799813685248, -4503599627370496,
+ (3,50): -9007199254740992, -18014398509481984, -36028797018963968,
+ (3,53): -72057594037927936, -144115188075855872, -288230376151711744,
+ (3,56): -576460752303423488, -1152921504606846976, -2305843009213693952,
+ (3,59): -4611686018427387904, -9223372036854775808, 0, 0, 0,
+ (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ (4,10): -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ (4,17): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ (4,23): -134217728, -268435456, -536870912, -1073741824, -2147483648,
+ (4,28): -4294967296, -8589934592, -17179869184, -34359738368,
+ (4,32): -68719476736, -137438953472, -274877906944, -549755813888,
+ (4,36): -1099511627776, -2199023255552, -4398046511104, -8796093022208,
+ (4,40): -17592186044416, -35184372088832, -70368744177664,
+ (4,43): -140737488355328, -281474976710656, -562949953421312,
+ (4,46): -1125899906842624, -2251799813685248, -4503599627370496,
+ (4,49): -9007199254740992, -18014398509481984, -36028797018963968,
+ (4,52): -72057594037927936, -144115188075855872, -288230376151711744,
+ (4,55): -576460752303423488, -1152921504606846976, -2305843009213693952,
+ (4,58): -4611686018427387904, -9223372036854775808, 0, 0, 0, 0,
+ (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ (5,10): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ (5,17): -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ (5,23): -268435456, -536870912, -1073741824, -2147483648, -4294967296,
+ (5,28): -8589934592, -17179869184, -34359738368, -68719476736,
+ (5,32): -137438953472, -274877906944, -549755813888, -1099511627776,
+ (5,36): -2199023255552, -4398046511104, -8796093022208, -17592186044416,
+ (5,40): -35184372088832, -70368744177664, -140737488355328,
+ (5,43): -281474976710656, -562949953421312, -1125899906842624,
+ (5,46): -2251799813685248, -4503599627370496, -9007199254740992,
+ (5,49): -18014398509481984, -36028797018963968, -72057594037927936,
+ (5,52): -144115188075855872, -288230376151711744, -576460752303423488,
+ (5,55): -1152921504606846976, -2305843009213693952, -4611686018427387904,
+ (5,58): -9223372036854775808, 0, 0, 0, 0, 0,
+ (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ (6,10): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ (6,17): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ (6,23): -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ (6,28): -17179869184, -34359738368, -68719476736, -137438953472,
+ (6,32): -274877906944, -549755813888, -1099511627776, -2199023255552,
+ (6,36): -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ (6,40): -70368744177664, -140737488355328, -281474976710656,
+ (6,43): -562949953421312, -1125899906842624, -2251799813685248,
+ (6,46): -4503599627370496, -9007199254740992, -18014398509481984,
+ (6,49): -36028797018963968, -72057594037927936, -144115188075855872,
+ (6,52): -288230376151711744, -576460752303423488, -1152921504606846976,
+ (6,55): -2305843009213693952, -4611686018427387904, -9223372036854775808,
+ (6,58): 0, 0, 0, 0, 0, 0,
+ (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ (7,9): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ (7,16): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ (7,22): -536870912, -1073741824, -2147483648, -4294967296, -8589934592,
+ (7,27): -17179869184, -34359738368, -68719476736, -137438953472,
+ (7,31): -274877906944, -549755813888, -1099511627776, -2199023255552,
+ (7,35): -4398046511104, -8796093022208, -17592186044416, -35184372088832,
+ (7,39): -70368744177664, -140737488355328, -281474976710656,
+ (7,42): -562949953421312, -1125899906842624, -2251799813685248,
+ (7,45): -4503599627370496, -9007199254740992, -18014398509481984,
+ (7,48): -36028797018963968, -72057594037927936, -144115188075855872,
+ (7,51): -288230376151711744, -576460752303423488, -1152921504606846976,
+ (7,54): -2305843009213693952, -4611686018427387904, -9223372036854775808,
+ (7,57): 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLongLongWhole1.ddl b/tools/testfiles/tpbitsSignedLongLongWhole1.ddl
new file mode 100644
index 0000000..4a32153
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLongLongWhole1.ddl
@@ -0,0 +1,178 @@
+#############################
+Expected output for 'h5dump -d /DS64BITS -M 1,63 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS64BITS" {
+ DATATYPE H5T_STD_I64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=1 LENGTH=63
+ DATA {
+ (0,0): 9223372036854775807, 9223372036854775807, 9223372036854775806,
+ (0,3): 9223372036854775804, 9223372036854775800, 9223372036854775792,
+ (0,6): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (0,9): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (0,12): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (0,15): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (0,18): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (0,21): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (0,24): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (0,27): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (0,30): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (0,33): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (0,36): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (0,39): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (0,42): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (0,45): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (0,48): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (0,51): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (0,54): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (0,57): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (0,60): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (0,63): 4611686018427387904,
+ (1,0): 9223372036854775807, 9223372036854775806, 9223372036854775804,
+ (1,3): 9223372036854775800, 9223372036854775792, 9223372036854775776,
+ (1,6): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (1,9): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (1,12): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (1,15): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (1,18): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (1,21): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (1,24): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (1,27): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (1,30): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (1,33): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (1,36): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (1,39): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (1,42): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (1,45): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (1,48): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (1,51): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (1,54): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (1,57): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (1,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (2,0): 9223372036854775806, 9223372036854775804, 9223372036854775800,
+ (2,3): 9223372036854775792, 9223372036854775776, 9223372036854775744,
+ (2,6): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (2,9): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (2,12): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (2,15): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (2,18): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (2,21): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (2,24): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (2,27): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (2,30): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (2,33): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (2,36): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (2,39): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (2,42): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (2,45): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (2,48): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (2,51): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (2,54): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (2,57): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (2,60): 6917529027641081856, 4611686018427387904, 0, 0,
+ (3,0): 9223372036854775804, 9223372036854775800, 9223372036854775792,
+ (3,3): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (3,6): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (3,9): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (3,12): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (3,15): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (3,18): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (3,21): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (3,24): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (3,27): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (3,30): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (3,33): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (3,36): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (3,39): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (3,42): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (3,45): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (3,48): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (3,51): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (3,54): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (3,57): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (3,60): 4611686018427387904, 0, 0, 0,
+ (4,0): 9223372036854775800, 9223372036854775792, 9223372036854775776,
+ (4,3): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (4,6): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (4,9): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (4,12): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (4,15): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (4,18): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (4,21): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (4,24): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (4,27): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (4,30): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (4,33): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (4,36): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (4,39): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (4,42): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (4,45): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (4,48): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (4,51): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (4,54): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (4,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (4,61): 0, 0, 0,
+ (5,0): 9223372036854775792, 9223372036854775776, 9223372036854775744,
+ (5,3): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (5,6): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (5,9): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (5,12): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (5,15): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (5,18): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (5,21): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (5,24): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (5,27): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (5,30): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (5,33): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (5,36): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (5,39): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (5,42): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (5,45): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (5,48): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (5,51): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (5,54): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (5,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0,
+ (6,0): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (6,3): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (6,6): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (6,9): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (6,12): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (6,15): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (6,18): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (6,21): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (6,24): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (6,27): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (6,30): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (6,33): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (6,36): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (6,39): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (6,42): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (6,45): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (6,48): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (6,51): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (6,54): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (6,57): 4611686018427387904, 0, 0, 0, 0, 0, 0,
+ (7,0): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (7,3): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (7,6): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (7,9): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (7,12): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (7,15): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (7,18): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (7,21): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (7,24): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (7,27): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (7,30): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (7,33): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (7,36): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (7,39): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (7,42): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (7,45): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (7,48): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (7,51): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (7,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (7,58): 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLongLongWhole63.ddl b/tools/testfiles/tpbitsSignedLongLongWhole63.ddl
new file mode 100644
index 0000000..6dcad25
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLongLongWhole63.ddl
@@ -0,0 +1,175 @@
+#############################
+Expected output for 'h5dump -d /DS64BITS -M 0,63 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS64BITS" {
+ DATATYPE H5T_STD_I64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=63
+ DATA {
+ (0,0): 9223372036854775807, 9223372036854775806, 9223372036854775804,
+ (0,3): 9223372036854775800, 9223372036854775792, 9223372036854775776,
+ (0,6): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (0,9): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (0,12): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (0,15): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (0,18): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (0,21): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (0,24): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (0,27): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (0,30): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (0,33): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (0,36): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (0,39): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (0,42): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (0,45): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (0,48): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (0,51): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (0,54): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (0,57): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (0,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (1,0): 9223372036854775806, 9223372036854775804, 9223372036854775800,
+ (1,3): 9223372036854775792, 9223372036854775776, 9223372036854775744,
+ (1,6): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (1,9): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (1,12): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (1,15): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (1,18): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (1,21): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (1,24): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (1,27): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (1,30): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (1,33): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (1,36): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (1,39): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (1,42): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (1,45): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (1,48): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (1,51): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (1,54): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (1,57): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (1,60): 6917529027641081856, 4611686018427387904, 0, 0,
+ (2,0): 9223372036854775804, 9223372036854775800, 9223372036854775792,
+ (2,3): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (2,6): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (2,9): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (2,12): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (2,15): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (2,18): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (2,21): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (2,24): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (2,27): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (2,30): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (2,33): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (2,36): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (2,39): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (2,42): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (2,45): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (2,48): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (2,51): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (2,54): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (2,57): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (2,60): 4611686018427387904, 0, 0, 0,
+ (3,0): 9223372036854775800, 9223372036854775792, 9223372036854775776,
+ (3,3): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (3,6): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (3,9): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (3,12): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (3,15): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (3,18): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (3,21): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (3,24): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (3,27): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (3,30): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (3,33): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (3,36): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (3,39): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (3,42): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (3,45): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (3,48): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (3,51): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (3,54): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (3,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (3,61): 0, 0, 0,
+ (4,0): 9223372036854775792, 9223372036854775776, 9223372036854775744,
+ (4,3): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (4,6): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (4,9): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (4,12): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (4,15): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (4,18): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (4,21): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (4,24): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (4,27): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (4,30): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (4,33): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (4,36): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (4,39): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (4,42): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (4,45): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (4,48): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (4,51): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (4,54): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (4,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0,
+ (5,0): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (5,3): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (5,6): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (5,9): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (5,12): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (5,15): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (5,18): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (5,21): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (5,24): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (5,27): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (5,30): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (5,33): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (5,36): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (5,39): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (5,42): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (5,45): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (5,48): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (5,51): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (5,54): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (5,57): 4611686018427387904, 0, 0, 0, 0, 0, 0,
+ (6,0): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (6,3): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (6,6): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (6,9): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (6,12): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (6,15): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (6,18): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (6,21): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (6,24): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (6,27): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (6,30): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (6,33): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (6,36): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (6,39): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (6,42): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (6,45): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (6,48): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (6,51): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (6,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (6,58): 0, 0, 0, 0, 0, 0,
+ (7,0): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (7,3): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (7,6): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (7,9): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (7,12): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (7,15): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (7,18): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (7,21): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (7,24): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (7,27): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (7,30): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (7,33): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (7,36): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (7,39): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (7,42): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (7,45): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (7,48): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (7,51): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (7,54): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedLongWhole.ddl b/tools/testfiles/tpbitsSignedLongWhole.ddl
new file mode 100644
index 0000000..5ae5300
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLongWhole.ddl
@@ -0,0 +1,49 @@
+#############################
+Expected output for 'h5dump -d /DS32BITS -M 0,32 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS32BITS" {
+ DATATYPE H5T_STD_I32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=0 LENGTH=32
+ DATA {
+ (0,0): -1, -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048,
+ (0,12): -4096, -8192, -16384, -32768, -65536, -131072, -262144, -524288,
+ (0,20): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432,
+ (0,26): -67108864, -134217728, -268435456, -536870912, -1073741824,
+ (0,31): -2147483648,
+ (1,0): -2, -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ (1,12): -8192, -16384, -32768, -65536, -131072, -262144, -524288,
+ (1,19): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432,
+ (1,25): -67108864, -134217728, -268435456, -536870912, -1073741824,
+ (1,30): -2147483648, 0,
+ (2,0): -4, -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096,
+ (2,11): -8192, -16384, -32768, -65536, -131072, -262144, -524288,
+ (2,18): -1048576, -2097152, -4194304, -8388608, -16777216, -33554432,
+ (2,24): -67108864, -134217728, -268435456, -536870912, -1073741824,
+ (2,29): -2147483648, 0, 0,
+ (3,0): -8, -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ (3,11): -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ (3,18): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ (3,24): -134217728, -268435456, -536870912, -1073741824, -2147483648, 0,
+ (3,30): 0, 0,
+ (4,0): -16, -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192,
+ (4,10): -16384, -32768, -65536, -131072, -262144, -524288, -1048576,
+ (4,17): -2097152, -4194304, -8388608, -16777216, -33554432, -67108864,
+ (4,23): -134217728, -268435456, -536870912, -1073741824, -2147483648, 0,
+ (4,29): 0, 0, 0,
+ (5,0): -32, -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384,
+ (5,10): -32768, -65536, -131072, -262144, -524288, -1048576, -2097152,
+ (5,17): -4194304, -8388608, -16777216, -33554432, -67108864, -134217728,
+ (5,23): -268435456, -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0,
+ (6,0): -64, -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ (6,10): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ (6,17): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ (6,23): -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0,
+ (7,0): -128, -256, -512, -1024, -2048, -4096, -8192, -16384, -32768,
+ (7,9): -65536, -131072, -262144, -524288, -1048576, -2097152, -4194304,
+ (7,16): -8388608, -16777216, -33554432, -67108864, -134217728, -268435456,
+ (7,22): -536870912, -1073741824, -2147483648, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsSignedWhole.ddl b/tools/testfiles/tpbitsSignedWhole.ddl
new file mode 100644
index 0000000..706f270
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedWhole.ddl
@@ -0,0 +1,20 @@
+#############################
+Expected output for 'h5dump -d /DS08BITS -M 0,8 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DS08BITS" {
+ DATATYPE H5T_STD_I8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=0 LENGTH=8
+ DATA {
+ (0,0): -1, -2, -4, -8, -16, -32, -64, -128,
+ (1,0): -2, -4, -8, -16, -32, -64, -128, 0,
+ (2,0): -4, -8, -16, -32, -64, -128, 0, 0,
+ (3,0): -8, -16, -32, -64, -128, 0, 0, 0,
+ (4,0): -16, -32, -64, -128, 0, 0, 0, 0,
+ (5,0): -32, -64, -128, 0, 0, 0, 0, 0,
+ (6,0): -64, -128, 0, 0, 0, 0, 0, 0,
+ (7,0): -128, 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
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsigned2.ddl b/tools/testfiles/tpbitsUnsigned2.ddl
new file mode 100644
index 0000000..d8581b2
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsigned2.ddl
@@ -0,0 +1,53 @@
+#############################
+Expected output for 'h5dump -d /DU08BITS -M 0,2,2,2,4,2,6,2 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=2
+ DATA {
+ (0,0): 3, 3, 3, 2, 0, 0, 0, 0,
+ (1,0): 3, 3, 2, 0, 0, 0, 0, 0,
+ (2,0): 3, 2, 0, 0, 0, 0, 0, 0,
+ (3,0): 2, 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=2
+ DATA {
+ (0,0): 3, 3, 3, 3, 3, 2, 0, 0,
+ (1,0): 3, 3, 3, 3, 2, 0, 0, 0,
+ (2,0): 3, 3, 3, 2, 0, 0, 0, 0,
+ (3,0): 3, 3, 2, 0, 0, 0, 0, 0,
+ (4,0): 3, 2, 0, 0, 0, 0, 0, 0,
+ (5,0): 2, 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=2
+ DATA {
+ (0,0): 3, 3, 3, 3, 3, 3, 3, 2,
+ (1,0): 3, 3, 3, 3, 3, 3, 2, 0,
+ (2,0): 3, 3, 3, 3, 3, 2, 0, 0,
+ (3,0): 3, 3, 3, 3, 2, 0, 0, 0,
+ (4,0): 3, 3, 3, 2, 0, 0, 0, 0,
+ (5,0): 3, 3, 2, 0, 0, 0, 0, 0,
+ (6,0): 3, 2, 0, 0, 0, 0, 0, 0,
+ (7,0): 2, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsigned4.ddl b/tools/testfiles/tpbitsUnsigned4.ddl
new file mode 100644
index 0000000..b320386
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsigned4.ddl
@@ -0,0 +1,31 @@
+#############################
+Expected output for 'h5dump -d /DU08BITS -M 0,4,4,4 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU08BITS" {
+ DATATYPE H5T_STD_U8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=0 LENGTH=4
+ DATA {
+ (0,0): 15, 14, 12, 8, 0, 0, 0, 0,
+ (1,0): 14, 12, 8, 0, 0, 0, 0, 0,
+ (2,0): 12, 8, 0, 0, 0, 0, 0, 0,
+ (3,0): 8, 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=4
+ DATA {
+ (0,0): 15, 15, 15, 15, 15, 14, 12, 8,
+ (1,0): 15, 15, 15, 15, 14, 12, 8, 0,
+ (2,0): 15, 15, 15, 14, 12, 8, 0, 0,
+ (3,0): 15, 15, 14, 12, 8, 0, 0, 0,
+ (4,0): 15, 14, 12, 8, 0, 0, 0, 0,
+ (5,0): 14, 12, 8, 0, 0, 0, 0, 0,
+ (6,0): 12, 8, 0, 0, 0, 0, 0, 0,
+ (7,0): 8, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedInt.ddl b/tools/testfiles/tpbitsUnsignedInt.ddl
new file mode 100644
index 0000000..1908f31
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedInt.ddl
@@ -0,0 +1,31 @@
+#############################
+Expected output for 'h5dump -d /DU16BITS -M 0,2,10,6 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU16BITS" {
+ DATATYPE H5T_STD_U16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=0 LENGTH=2
+ DATA {
+ (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=10 LENGTH=6
+ DATA {
+ (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32,
+ (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0,
+ (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0,
+ (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0,
+ (4,0): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0,
+ (5,0): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0,
+ (6,0): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0,
+ (7,0): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedInt4.ddl b/tools/testfiles/tpbitsUnsignedInt4.ddl
new file mode 100644
index 0000000..9ff49ccc
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedInt4.ddl
@@ -0,0 +1,53 @@
+#############################
+Expected output for 'h5dump -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU16BITS" {
+ DATATYPE H5T_STD_U16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=0 LENGTH=4
+ DATA {
+ (0,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=4 LENGTH=4
+ DATA {
+ (0,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=8 LENGTH=4
+ DATA {
+ (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0,
+ (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0,
+ (2,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0,
+ (3,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=12 LENGTH=4
+ DATA {
+ (0,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8,
+ (1,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0,
+ (2,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0,
+ (3,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0,
+ (4,0): 15, 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0,
+ (5,0): 15, 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0,
+ (6,0): 15, 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0,
+ (7,0): 15, 15, 15, 15, 15, 15, 14, 12, 8, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedInt8.ddl b/tools/testfiles/tpbitsUnsignedInt8.ddl
new file mode 100644
index 0000000..7813172
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedInt8.ddl
@@ -0,0 +1,37 @@
+#############################
+Expected output for 'h5dump -d /DU16BITS -M 0,8,8,8 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU16BITS" {
+ DATATYPE H5T_STD_U16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=0 LENGTH=8
+ DATA {
+ (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=8 LENGTH=8
+ DATA {
+ (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240,
+ (0,13): 224, 192, 128,
+ (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224,
+ (1,13): 192, 128, 0,
+ (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192,
+ (2,13): 128, 0, 0,
+ (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0,
+ (3,14): 0, 0,
+ (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0,
+ (4,14): 0, 0,
+ (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0,
+ (5,15): 0,
+ (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0,
+ (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedIntWhole.ddl b/tools/testfiles/tpbitsUnsignedIntWhole.ddl
new file mode 100644
index 0000000..d0052b9
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedIntWhole.ddl
@@ -0,0 +1,28 @@
+#############################
+Expected output for 'h5dump -d /DU16BITS -M 0,16 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU16BITS" {
+ DATATYPE H5T_STD_U16LE
+ DATASPACE SIMPLE { ( 8, 16 ) / ( 8, 16 ) }
+ PACKED_BITS OFFSET=0 LENGTH=16
+ DATA {
+ (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768,
+ (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0,
+ (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (3,9): 61440, 57344, 49152, 32768, 0, 0, 0,
+ (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (4,9): 57344, 49152, 32768, 0, 0, 0, 0,
+ (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (5,9): 49152, 32768, 0, 0, 0, 0, 0,
+ (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (6,9): 32768, 0, 0, 0, 0, 0, 0,
+ (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (7,10): 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLong.ddl b/tools/testfiles/tpbitsUnsignedLong.ddl
new file mode 100644
index 0000000..1f64904
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLong.ddl
@@ -0,0 +1,47 @@
+#############################
+Expected output for 'h5dump -d /DU32BITS -M 0,2,26,6 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU32BITS" {
+ DATATYPE H5T_STD_U32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=0 LENGTH=2
+ DATA {
+ (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=26 LENGTH=6
+ DATA {
+ (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32,
+ (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0,
+ (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0,
+ (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,17): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0,
+ (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,17): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0,
+ (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (5,17): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0,
+ (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (6,17): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0,
+ (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (7,17): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLong16.ddl b/tools/testfiles/tpbitsUnsignedLong16.ddl
new file mode 100644
index 0000000..9414351
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLong16.ddl
@@ -0,0 +1,70 @@
+#############################
+Expected output for 'h5dump -d /DU32BITS -M 0,16,16,16 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU32BITS" {
+ DATATYPE H5T_STD_U32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=0 LENGTH=16
+ DATA {
+ (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,25): 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,26): 0, 0, 0, 0, 0, 0,
+ (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,27): 0, 0, 0, 0, 0,
+ (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,29): 0, 0, 0,
+ (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,30): 0, 0,
+ (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=16 LENGTH=16
+ DATA {
+ (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (0,27): 63488, 61440, 57344, 49152, 32768,
+ (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532,
+ (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (1,27): 61440, 57344, 49152, 32768, 0,
+ (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528,
+ (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (2,27): 57344, 49152, 32768, 0, 0,
+ (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520,
+ (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (3,27): 49152, 32768, 0, 0, 0,
+ (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504,
+ (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (4,27): 32768, 0, 0, 0, 0,
+ (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472,
+ (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (5,28): 0, 0, 0, 0,
+ (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408,
+ (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ (6,29): 0, 0, 0,
+ (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (7,31): 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLong8.ddl b/tools/testfiles/tpbitsUnsignedLong8.ddl
new file mode 100644
index 0000000..5480555
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLong8.ddl
@@ -0,0 +1,99 @@
+#############################
+Expected output for 'h5dump -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU32BITS" {
+ DATATYPE H5T_STD_U32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=0 LENGTH=8
+ DATA {
+ (0,0): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,17): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,18): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,19): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,20): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,21): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=8 LENGTH=8
+ DATA {
+ (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240,
+ (0,13): 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224,
+ (1,13): 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192,
+ (2,13): 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0,
+ (3,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0,
+ (4,14): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0,
+ (5,15): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0,
+ (6,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0,
+ (7,16): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=16 LENGTH=8
+ DATA {
+ (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (0,13): 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0,
+ (0,28): 0, 0, 0, 0,
+ (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (1,13): 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0,
+ (1,28): 0, 0, 0, 0,
+ (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (2,13): 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0,
+ (2,29): 0, 0, 0,
+ (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (3,13): 255, 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,30): 0, 0,
+ (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (4,13): 254, 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,30): 0, 0,
+ (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254,
+ (5,13): 252, 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,31): 0,
+ (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252,
+ (6,13): 248, 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248,
+ (7,13): 240, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=24 LENGTH=8
+ DATA {
+ (0,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (0,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254,
+ (0,26): 252, 248, 240, 224, 192, 128,
+ (1,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (1,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252,
+ (1,26): 248, 240, 224, 192, 128, 0,
+ (2,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (2,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248,
+ (2,26): 240, 224, 192, 128, 0, 0,
+ (3,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (3,13): 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240,
+ (3,26): 224, 192, 128, 0, 0, 0,
+ (4,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (4,13): 255, 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224,
+ (4,26): 192, 128, 0, 0, 0, 0,
+ (5,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (5,13): 255, 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192,
+ (5,26): 128, 0, 0, 0, 0, 0,
+ (6,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (6,13): 255, 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128,
+ (6,26): 0, 0, 0, 0, 0, 0,
+ (7,0): 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+ (7,13): 255, 255, 255, 255, 255, 254, 252, 248, 240, 224, 192, 128, 0, 0,
+ (7,27): 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLongLong.ddl b/tools/testfiles/tpbitsUnsignedLongLong.ddl
new file mode 100644
index 0000000..a2b326c
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLongLong.ddl
@@ -0,0 +1,71 @@
+#############################
+Expected output for 'h5dump -d /DU64BITS -M 0,2,58,6 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU64BITS" {
+ DATATYPE H5T_STD_U64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=2
+ DATA {
+ (0,0): 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=58 LENGTH=6
+ DATA {
+ (0,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (0,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (0,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (0,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32,
+ (1,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (1,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (1,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (1,49): 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0,
+ (2,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (2,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (2,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (2,49): 63, 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0,
+ (3,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (3,49): 63, 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0,
+ (4,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (4,49): 63, 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0,
+ (5,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (5,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (5,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (5,49): 63, 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0,
+ (6,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (6,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (6,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (6,49): 63, 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0,
+ (7,0): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (7,17): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (7,33): 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ (7,49): 63, 63, 63, 62, 60, 56, 48, 32, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLongLong16.ddl b/tools/testfiles/tpbitsUnsignedLongLong16.ddl
new file mode 100644
index 0000000..1f6bb67
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLongLong16.ddl
@@ -0,0 +1,199 @@
+#############################
+Expected output for 'h5dump -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU64BITS" {
+ DATATYPE H5T_STD_U64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=16
+ DATA {
+ (0,0): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (0,9): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (0,22): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (1,9): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,23): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (2,9): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,25): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (3,9): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,26): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (4,9): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (5,9): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (6,9): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,30): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,52): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (7,10): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=16 LENGTH=16
+ DATA {
+ (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ (0,18): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (0,27): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,42): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532,
+ (1,18): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (1,27): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528,
+ (2,18): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (2,27): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,45): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,9): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520,
+ (3,18): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (3,27): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,9): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504,
+ (4,18): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (4,27): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,48): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,9): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472,
+ (5,18): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (5,28): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,9): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408,
+ (6,18): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ (6,29): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,9): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (7,18): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (7,31): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,53): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=32 LENGTH=16
+ DATA {
+ (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528,
+ (0,36): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (0,45): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,63): 0,
+ (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,27): 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520,
+ (1,36): 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344,
+ (1,45): 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,27): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504,
+ (2,36): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (2,45): 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,27): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472,
+ (3,36): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (3,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,27): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408,
+ (4,36): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ (4,47): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,27): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (5,36): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (5,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,27): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (6,36): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,50): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ (7,27): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (7,36): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,51): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=48 LENGTH=16
+ DATA {
+ (0,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (0,45): 65535, 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504,
+ (0,54): 65472, 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152,
+ (0,63): 32768,
+ (1,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (1,45): 65535, 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472,
+ (1,54): 65408, 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0,
+ (2,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (2,45): 65535, 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408,
+ (2,54): 65280, 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0,
+ (3,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (3,45): 65535, 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280,
+ (3,54): 65024, 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0,
+ (4,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (4,45): 65534, 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024,
+ (4,54): 64512, 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0,
+ (5,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (5,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534,
+ (5,45): 65532, 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512,
+ (5,54): 63488, 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0,
+ (6,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (6,36): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532,
+ (6,45): 65528, 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488,
+ (6,54): 61440, 57344, 49152, 32768, 0, 0, 0, 0, 0, 0,
+ (7,0): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,9): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,18): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,27): 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
+ (7,36): 65535, 65535, 65535, 65535, 65535, 65535, 65534, 65532, 65528,
+ (7,45): 65520, 65504, 65472, 65408, 65280, 65024, 64512, 63488, 61440,
+ (7,54): 57344, 49152, 32768, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLongLong32.ddl b/tools/testfiles/tpbitsUnsignedLongLong32.ddl
new file mode 100644
index 0000000..19b9258
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLongLong32.ddl
@@ -0,0 +1,178 @@
+#############################
+Expected output for 'h5dump -d /DU64BITS -M 0,32,32,32 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU64BITS" {
+ DATATYPE H5T_STD_U64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=32
+ DATA {
+ (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280,
+ (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (0,30): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (0,46): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ (1,30): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (1,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0,
+ (2,32): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (2,54): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0,
+ (3,35): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (3,57): 0, 0, 0, 0, 0, 0, 0,
+ (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,38): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (4,60): 0, 0, 0, 0,
+ (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,41): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (5,63): 0,
+ (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ (6,25): 2147483648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (6,44): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0,
+ (7,27): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ (7,49): 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+ PACKED_BITS OFFSET=32 LENGTH=32
+ DATA {
+ (0,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (0,30): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292,
+ (0,35): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ (0,40): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ (0,45): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ (0,50): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ (0,55): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ (0,60): 4026531840, 3758096384, 3221225472, 2147483648,
+ (1,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (1,30): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288,
+ (1,35): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ (1,40): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ (1,45): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ (1,50): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ (1,55): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ (1,60): 3758096384, 3221225472, 2147483648, 0,
+ (2,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (2,30): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280,
+ (2,35): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (2,40): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (2,45): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (2,50): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (2,55): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (2,60): 3221225472, 2147483648, 0, 0,
+ (3,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (3,30): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ (3,35): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ (3,40): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ (3,45): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ (3,50): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ (3,55): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ (3,60): 2147483648, 0, 0, 0,
+ (4,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (4,25): 4294967295, 4294967295, 4294967295, 4294967295, 4294967294,
+ (4,30): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ (4,35): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ (4,40): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ (4,45): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ (4,50): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ (4,55): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0,
+ (4,62): 0, 0,
+ (5,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (5,25): 4294967295, 4294967295, 4294967295, 4294967294, 4294967292,
+ (5,30): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ (5,35): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ (5,40): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ (5,45): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ (5,50): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ (5,55): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0,
+ (6,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (6,25): 4294967295, 4294967295, 4294967294, 4294967292, 4294967288,
+ (6,30): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ (6,35): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ (6,40): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ (6,45): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ (6,50): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ (6,55): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0, 0, 0,
+ (7,0): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,5): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,10): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,15): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,20): 4294967295, 4294967295, 4294967295, 4294967295, 4294967295,
+ (7,25): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280,
+ (7,30): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (7,35): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (7,40): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (7,45): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (7,50): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (7,55): 3221225472, 2147483648, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole.ddl b/tools/testfiles/tpbitsUnsignedLongLongWhole.ddl
new file mode 100644
index 0000000..93cb1f8
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLongLongWhole.ddl
@@ -0,0 +1,179 @@
+#############################
+Expected output for 'h5dump -d /DU64BITS -M 0,64 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU64BITS" {
+ DATATYPE H5T_STD_U64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=64
+ DATA {
+ (0,0): 18446744073709551615, 18446744073709551614, 18446744073709551612,
+ (0,3): 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ (0,6): 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ (0,9): 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ (0,12): 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ (0,15): 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ (0,18): 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ (0,21): 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ (0,24): 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ (0,27): 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ (0,30): 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ (0,33): 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ (0,36): 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ (0,39): 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ (0,42): 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ (0,45): 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ (0,48): 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ (0,51): 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ (0,54): 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ (0,57): 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ (0,60): 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ (0,63): 9223372036854775808,
+ (1,0): 18446744073709551614, 18446744073709551612, 18446744073709551608,
+ (1,3): 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ (1,6): 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ (1,9): 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ (1,12): 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ (1,15): 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ (1,18): 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ (1,21): 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ (1,24): 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ (1,27): 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ (1,30): 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ (1,33): 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ (1,36): 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ (1,39): 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ (1,42): 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ (1,45): 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ (1,48): 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ (1,51): 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ (1,54): 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ (1,57): 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ (1,60): 16140901064495857664, 13835058055282163712, 9223372036854775808,
+ (1,63): 0,
+ (2,0): 18446744073709551612, 18446744073709551608, 18446744073709551600,
+ (2,3): 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ (2,6): 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ (2,9): 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ (2,12): 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ (2,15): 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ (2,18): 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ (2,21): 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ (2,24): 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ (2,27): 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ (2,30): 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ (2,33): 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ (2,36): 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ (2,39): 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ (2,42): 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ (2,45): 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ (2,48): 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ (2,51): 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ (2,54): 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ (2,57): 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ (2,60): 13835058055282163712, 9223372036854775808, 0, 0,
+ (3,0): 18446744073709551608, 18446744073709551600, 18446744073709551584,
+ (3,3): 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ (3,6): 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ (3,9): 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ (3,12): 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ (3,15): 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ (3,18): 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ (3,21): 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ (3,24): 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ (3,27): 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ (3,30): 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ (3,33): 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ (3,36): 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ (3,39): 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ (3,42): 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ (3,45): 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ (3,48): 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ (3,51): 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ (3,54): 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ (3,57): 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ (3,60): 9223372036854775808, 0, 0, 0,
+ (4,0): 18446744073709551600, 18446744073709551584, 18446744073709551552,
+ (4,3): 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ (4,6): 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ (4,9): 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ (4,12): 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ (4,15): 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ (4,18): 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ (4,21): 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ (4,24): 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ (4,27): 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ (4,30): 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ (4,33): 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ (4,36): 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ (4,39): 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ (4,42): 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ (4,45): 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ (4,48): 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ (4,51): 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ (4,54): 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ (4,57): 16140901064495857664, 13835058055282163712, 9223372036854775808,
+ (4,60): 0, 0, 0, 0,
+ (5,0): 18446744073709551584, 18446744073709551552, 18446744073709551488,
+ (5,3): 18446744073709551360, 18446744073709551104, 18446744073709550592,
+ (5,6): 18446744073709549568, 18446744073709547520, 18446744073709543424,
+ (5,9): 18446744073709535232, 18446744073709518848, 18446744073709486080,
+ (5,12): 18446744073709420544, 18446744073709289472, 18446744073709027328,
+ (5,15): 18446744073708503040, 18446744073707454464, 18446744073705357312,
+ (5,18): 18446744073701163008, 18446744073692774400, 18446744073675997184,
+ (5,21): 18446744073642442752, 18446744073575333888, 18446744073441116160,
+ (5,24): 18446744073172680704, 18446744072635809792, 18446744071562067968,
+ (5,27): 18446744069414584320, 18446744065119617024, 18446744056529682432,
+ (5,30): 18446744039349813248, 18446744004990074880, 18446743936270598144,
+ (5,33): 18446743798831644672, 18446743523953737728, 18446742974197923840,
+ (5,36): 18446741874686296064, 18446739675663040512, 18446735277616529408,
+ (5,39): 18446726481523507200, 18446708889337462784, 18446673704965373952,
+ (5,42): 18446603336221196288, 18446462598732840960, 18446181123756130304,
+ (5,45): 18445618173802708992, 18444492273895866368, 18442240474082181120,
+ (5,48): 18437736874454810624, 18428729675200069632, 18410715276690587648,
+ (5,51): 18374686479671623680, 18302628885633695744, 18158513697557839872,
+ (5,54): 17870283321406128128, 17293822569102704640, 16140901064495857664,
+ (5,57): 13835058055282163712, 9223372036854775808, 0, 0, 0, 0, 0,
+ (6,0): 18446744073709551552, 18446744073709551488, 18446744073709551360,
+ (6,3): 18446744073709551104, 18446744073709550592, 18446744073709549568,
+ (6,6): 18446744073709547520, 18446744073709543424, 18446744073709535232,
+ (6,9): 18446744073709518848, 18446744073709486080, 18446744073709420544,
+ (6,12): 18446744073709289472, 18446744073709027328, 18446744073708503040,
+ (6,15): 18446744073707454464, 18446744073705357312, 18446744073701163008,
+ (6,18): 18446744073692774400, 18446744073675997184, 18446744073642442752,
+ (6,21): 18446744073575333888, 18446744073441116160, 18446744073172680704,
+ (6,24): 18446744072635809792, 18446744071562067968, 18446744069414584320,
+ (6,27): 18446744065119617024, 18446744056529682432, 18446744039349813248,
+ (6,30): 18446744004990074880, 18446743936270598144, 18446743798831644672,
+ (6,33): 18446743523953737728, 18446742974197923840, 18446741874686296064,
+ (6,36): 18446739675663040512, 18446735277616529408, 18446726481523507200,
+ (6,39): 18446708889337462784, 18446673704965373952, 18446603336221196288,
+ (6,42): 18446462598732840960, 18446181123756130304, 18445618173802708992,
+ (6,45): 18444492273895866368, 18442240474082181120, 18437736874454810624,
+ (6,48): 18428729675200069632, 18410715276690587648, 18374686479671623680,
+ (6,51): 18302628885633695744, 18158513697557839872, 17870283321406128128,
+ (6,54): 17293822569102704640, 16140901064495857664, 13835058055282163712,
+ (6,57): 9223372036854775808, 0, 0, 0, 0, 0, 0,
+ (7,0): 18446744073709551488, 18446744073709551360, 18446744073709551104,
+ (7,3): 18446744073709550592, 18446744073709549568, 18446744073709547520,
+ (7,6): 18446744073709543424, 18446744073709535232, 18446744073709518848,
+ (7,9): 18446744073709486080, 18446744073709420544, 18446744073709289472,
+ (7,12): 18446744073709027328, 18446744073708503040, 18446744073707454464,
+ (7,15): 18446744073705357312, 18446744073701163008, 18446744073692774400,
+ (7,18): 18446744073675997184, 18446744073642442752, 18446744073575333888,
+ (7,21): 18446744073441116160, 18446744073172680704, 18446744072635809792,
+ (7,24): 18446744071562067968, 18446744069414584320, 18446744065119617024,
+ (7,27): 18446744056529682432, 18446744039349813248, 18446744004990074880,
+ (7,30): 18446743936270598144, 18446743798831644672, 18446743523953737728,
+ (7,33): 18446742974197923840, 18446741874686296064, 18446739675663040512,
+ (7,36): 18446735277616529408, 18446726481523507200, 18446708889337462784,
+ (7,39): 18446673704965373952, 18446603336221196288, 18446462598732840960,
+ (7,42): 18446181123756130304, 18445618173802708992, 18444492273895866368,
+ (7,45): 18442240474082181120, 18437736874454810624, 18428729675200069632,
+ (7,48): 18410715276690587648, 18374686479671623680, 18302628885633695744,
+ (7,51): 18158513697557839872, 17870283321406128128, 17293822569102704640,
+ (7,54): 16140901064495857664, 13835058055282163712, 9223372036854775808,
+ (7,57): 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl b/tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl
new file mode 100644
index 0000000..896eff3
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLongLongWhole1.ddl
@@ -0,0 +1,178 @@
+#############################
+Expected output for 'h5dump -d /DU64BITS -M 1,63 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU64BITS" {
+ DATATYPE H5T_STD_U64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=1 LENGTH=63
+ DATA {
+ (0,0): 9223372036854775807, 9223372036854775807, 9223372036854775806,
+ (0,3): 9223372036854775804, 9223372036854775800, 9223372036854775792,
+ (0,6): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (0,9): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (0,12): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (0,15): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (0,18): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (0,21): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (0,24): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (0,27): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (0,30): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (0,33): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (0,36): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (0,39): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (0,42): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (0,45): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (0,48): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (0,51): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (0,54): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (0,57): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (0,60): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (0,63): 4611686018427387904,
+ (1,0): 9223372036854775807, 9223372036854775806, 9223372036854775804,
+ (1,3): 9223372036854775800, 9223372036854775792, 9223372036854775776,
+ (1,6): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (1,9): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (1,12): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (1,15): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (1,18): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (1,21): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (1,24): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (1,27): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (1,30): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (1,33): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (1,36): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (1,39): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (1,42): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (1,45): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (1,48): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (1,51): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (1,54): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (1,57): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (1,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (2,0): 9223372036854775806, 9223372036854775804, 9223372036854775800,
+ (2,3): 9223372036854775792, 9223372036854775776, 9223372036854775744,
+ (2,6): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (2,9): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (2,12): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (2,15): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (2,18): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (2,21): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (2,24): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (2,27): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (2,30): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (2,33): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (2,36): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (2,39): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (2,42): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (2,45): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (2,48): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (2,51): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (2,54): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (2,57): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (2,60): 6917529027641081856, 4611686018427387904, 0, 0,
+ (3,0): 9223372036854775804, 9223372036854775800, 9223372036854775792,
+ (3,3): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (3,6): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (3,9): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (3,12): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (3,15): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (3,18): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (3,21): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (3,24): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (3,27): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (3,30): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (3,33): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (3,36): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (3,39): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (3,42): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (3,45): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (3,48): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (3,51): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (3,54): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (3,57): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (3,60): 4611686018427387904, 0, 0, 0,
+ (4,0): 9223372036854775800, 9223372036854775792, 9223372036854775776,
+ (4,3): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (4,6): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (4,9): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (4,12): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (4,15): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (4,18): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (4,21): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (4,24): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (4,27): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (4,30): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (4,33): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (4,36): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (4,39): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (4,42): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (4,45): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (4,48): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (4,51): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (4,54): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (4,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (4,61): 0, 0, 0,
+ (5,0): 9223372036854775792, 9223372036854775776, 9223372036854775744,
+ (5,3): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (5,6): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (5,9): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (5,12): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (5,15): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (5,18): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (5,21): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (5,24): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (5,27): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (5,30): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (5,33): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (5,36): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (5,39): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (5,42): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (5,45): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (5,48): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (5,51): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (5,54): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (5,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0,
+ (6,0): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (6,3): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (6,6): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (6,9): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (6,12): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (6,15): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (6,18): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (6,21): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (6,24): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (6,27): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (6,30): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (6,33): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (6,36): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (6,39): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (6,42): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (6,45): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (6,48): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (6,51): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (6,54): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (6,57): 4611686018427387904, 0, 0, 0, 0, 0, 0,
+ (7,0): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (7,3): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (7,6): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (7,9): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (7,12): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (7,15): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (7,18): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (7,21): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (7,24): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (7,27): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (7,30): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (7,33): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (7,36): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (7,39): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (7,42): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (7,45): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (7,48): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (7,51): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (7,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (7,58): 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl b/tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl
new file mode 100644
index 0000000..aff94a3
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLongLongWhole63.ddl
@@ -0,0 +1,175 @@
+#############################
+Expected output for 'h5dump -d /DU64BITS -M 0,63 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU64BITS" {
+ DATATYPE H5T_STD_U64LE
+ DATASPACE SIMPLE { ( 8, 64 ) / ( 8, 64 ) }
+ PACKED_BITS OFFSET=0 LENGTH=63
+ DATA {
+ (0,0): 9223372036854775807, 9223372036854775806, 9223372036854775804,
+ (0,3): 9223372036854775800, 9223372036854775792, 9223372036854775776,
+ (0,6): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (0,9): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (0,12): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (0,15): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (0,18): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (0,21): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (0,24): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (0,27): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (0,30): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (0,33): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (0,36): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (0,39): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (0,42): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (0,45): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (0,48): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (0,51): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (0,54): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (0,57): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (0,60): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (1,0): 9223372036854775806, 9223372036854775804, 9223372036854775800,
+ (1,3): 9223372036854775792, 9223372036854775776, 9223372036854775744,
+ (1,6): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (1,9): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (1,12): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (1,15): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (1,18): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (1,21): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (1,24): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (1,27): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (1,30): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (1,33): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (1,36): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (1,39): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (1,42): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (1,45): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (1,48): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (1,51): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (1,54): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (1,57): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (1,60): 6917529027641081856, 4611686018427387904, 0, 0,
+ (2,0): 9223372036854775804, 9223372036854775800, 9223372036854775792,
+ (2,3): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (2,6): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (2,9): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (2,12): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (2,15): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (2,18): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (2,21): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (2,24): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (2,27): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (2,30): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (2,33): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (2,36): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (2,39): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (2,42): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (2,45): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (2,48): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (2,51): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (2,54): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (2,57): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (2,60): 4611686018427387904, 0, 0, 0,
+ (3,0): 9223372036854775800, 9223372036854775792, 9223372036854775776,
+ (3,3): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (3,6): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (3,9): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (3,12): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (3,15): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (3,18): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (3,21): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (3,24): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (3,27): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (3,30): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (3,33): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (3,36): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (3,39): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (3,42): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (3,45): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (3,48): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (3,51): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (3,54): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (3,57): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (3,61): 0, 0, 0,
+ (4,0): 9223372036854775792, 9223372036854775776, 9223372036854775744,
+ (4,3): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (4,6): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (4,9): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (4,12): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (4,15): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (4,18): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (4,21): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (4,24): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (4,27): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (4,30): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (4,33): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (4,36): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (4,39): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (4,42): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (4,45): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (4,48): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (4,51): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (4,54): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (4,57): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0,
+ (5,0): 9223372036854775776, 9223372036854775744, 9223372036854775680,
+ (5,3): 9223372036854775552, 9223372036854775296, 9223372036854774784,
+ (5,6): 9223372036854773760, 9223372036854771712, 9223372036854767616,
+ (5,9): 9223372036854759424, 9223372036854743040, 9223372036854710272,
+ (5,12): 9223372036854644736, 9223372036854513664, 9223372036854251520,
+ (5,15): 9223372036853727232, 9223372036852678656, 9223372036850581504,
+ (5,18): 9223372036846387200, 9223372036837998592, 9223372036821221376,
+ (5,21): 9223372036787666944, 9223372036720558080, 9223372036586340352,
+ (5,24): 9223372036317904896, 9223372035781033984, 9223372034707292160,
+ (5,27): 9223372032559808512, 9223372028264841216, 9223372019674906624,
+ (5,30): 9223372002495037440, 9223371968135299072, 9223371899415822336,
+ (5,33): 9223371761976868864, 9223371487098961920, 9223370937343148032,
+ (5,36): 9223369837831520256, 9223367638808264704, 9223363240761753600,
+ (5,39): 9223354444668731392, 9223336852482686976, 9223301668110598144,
+ (5,42): 9223231299366420480, 9223090561878065152, 9222809086901354496,
+ (5,45): 9222246136947933184, 9221120237041090560, 9218868437227405312,
+ (5,48): 9214364837600034816, 9205357638345293824, 9187343239835811840,
+ (5,51): 9151314442816847872, 9079256848778919936, 8935141660703064064,
+ (5,54): 8646911284551352320, 8070450532247928832, 6917529027641081856,
+ (5,57): 4611686018427387904, 0, 0, 0, 0, 0, 0,
+ (6,0): 9223372036854775744, 9223372036854775680, 9223372036854775552,
+ (6,3): 9223372036854775296, 9223372036854774784, 9223372036854773760,
+ (6,6): 9223372036854771712, 9223372036854767616, 9223372036854759424,
+ (6,9): 9223372036854743040, 9223372036854710272, 9223372036854644736,
+ (6,12): 9223372036854513664, 9223372036854251520, 9223372036853727232,
+ (6,15): 9223372036852678656, 9223372036850581504, 9223372036846387200,
+ (6,18): 9223372036837998592, 9223372036821221376, 9223372036787666944,
+ (6,21): 9223372036720558080, 9223372036586340352, 9223372036317904896,
+ (6,24): 9223372035781033984, 9223372034707292160, 9223372032559808512,
+ (6,27): 9223372028264841216, 9223372019674906624, 9223372002495037440,
+ (6,30): 9223371968135299072, 9223371899415822336, 9223371761976868864,
+ (6,33): 9223371487098961920, 9223370937343148032, 9223369837831520256,
+ (6,36): 9223367638808264704, 9223363240761753600, 9223354444668731392,
+ (6,39): 9223336852482686976, 9223301668110598144, 9223231299366420480,
+ (6,42): 9223090561878065152, 9222809086901354496, 9222246136947933184,
+ (6,45): 9221120237041090560, 9218868437227405312, 9214364837600034816,
+ (6,48): 9205357638345293824, 9187343239835811840, 9151314442816847872,
+ (6,51): 9079256848778919936, 8935141660703064064, 8646911284551352320,
+ (6,54): 8070450532247928832, 6917529027641081856, 4611686018427387904, 0,
+ (6,58): 0, 0, 0, 0, 0, 0,
+ (7,0): 9223372036854775680, 9223372036854775552, 9223372036854775296,
+ (7,3): 9223372036854774784, 9223372036854773760, 9223372036854771712,
+ (7,6): 9223372036854767616, 9223372036854759424, 9223372036854743040,
+ (7,9): 9223372036854710272, 9223372036854644736, 9223372036854513664,
+ (7,12): 9223372036854251520, 9223372036853727232, 9223372036852678656,
+ (7,15): 9223372036850581504, 9223372036846387200, 9223372036837998592,
+ (7,18): 9223372036821221376, 9223372036787666944, 9223372036720558080,
+ (7,21): 9223372036586340352, 9223372036317904896, 9223372035781033984,
+ (7,24): 9223372034707292160, 9223372032559808512, 9223372028264841216,
+ (7,27): 9223372019674906624, 9223372002495037440, 9223371968135299072,
+ (7,30): 9223371899415822336, 9223371761976868864, 9223371487098961920,
+ (7,33): 9223370937343148032, 9223369837831520256, 9223367638808264704,
+ (7,36): 9223363240761753600, 9223354444668731392, 9223336852482686976,
+ (7,39): 9223301668110598144, 9223231299366420480, 9223090561878065152,
+ (7,42): 9222809086901354496, 9222246136947933184, 9221120237041090560,
+ (7,45): 9218868437227405312, 9214364837600034816, 9205357638345293824,
+ (7,48): 9187343239835811840, 9151314442816847872, 9079256848778919936,
+ (7,51): 8935141660703064064, 8646911284551352320, 8070450532247928832,
+ (7,54): 6917529027641081856, 4611686018427387904, 0, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedLongWhole.ddl b/tools/testfiles/tpbitsUnsignedLongWhole.ddl
new file mode 100644
index 0000000..f41655f
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLongWhole.ddl
@@ -0,0 +1,62 @@
+#############################
+Expected output for 'h5dump -d /DU32BITS -M 0,32 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU32BITS" {
+ DATATYPE H5T_STD_U32LE
+ DATASPACE SIMPLE { ( 8, 32 ) / ( 8, 32 ) }
+ PACKED_BITS OFFSET=0 LENGTH=32
+ DATA {
+ (0,0): 4294967295, 4294967294, 4294967292, 4294967288, 4294967280,
+ (0,5): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (0,10): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (0,15): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (0,20): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (0,25): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (0,30): 3221225472, 2147483648,
+ (1,0): 4294967294, 4294967292, 4294967288, 4294967280, 4294967264,
+ (1,5): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ (1,10): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ (1,15): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ (1,20): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ (1,25): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ (1,30): 2147483648, 0,
+ (2,0): 4294967292, 4294967288, 4294967280, 4294967264, 4294967232,
+ (2,5): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ (2,10): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ (2,15): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ (2,20): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ (2,25): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0,
+ (3,0): 4294967288, 4294967280, 4294967264, 4294967232, 4294967168,
+ (3,5): 4294967040, 4294966784, 4294966272, 4294965248, 4294963200,
+ (3,10): 4294959104, 4294950912, 4294934528, 4294901760, 4294836224,
+ (3,15): 4294705152, 4294443008, 4293918720, 4292870144, 4290772992,
+ (3,20): 4286578688, 4278190080, 4261412864, 4227858432, 4160749568,
+ (3,25): 4026531840, 3758096384, 3221225472, 2147483648, 0, 0, 0,
+ (4,0): 4294967280, 4294967264, 4294967232, 4294967168, 4294967040,
+ (4,5): 4294966784, 4294966272, 4294965248, 4294963200, 4294959104,
+ (4,10): 4294950912, 4294934528, 4294901760, 4294836224, 4294705152,
+ (4,15): 4294443008, 4293918720, 4292870144, 4290772992, 4286578688,
+ (4,20): 4278190080, 4261412864, 4227858432, 4160749568, 4026531840,
+ (4,25): 3758096384, 3221225472, 2147483648, 0, 0, 0, 0,
+ (5,0): 4294967264, 4294967232, 4294967168, 4294967040, 4294966784,
+ (5,5): 4294966272, 4294965248, 4294963200, 4294959104, 4294950912,
+ (5,10): 4294934528, 4294901760, 4294836224, 4294705152, 4294443008,
+ (5,15): 4293918720, 4292870144, 4290772992, 4286578688, 4278190080,
+ (5,20): 4261412864, 4227858432, 4160749568, 4026531840, 3758096384,
+ (5,25): 3221225472, 2147483648, 0, 0, 0, 0, 0,
+ (6,0): 4294967232, 4294967168, 4294967040, 4294966784, 4294966272,
+ (6,5): 4294965248, 4294963200, 4294959104, 4294950912, 4294934528,
+ (6,10): 4294901760, 4294836224, 4294705152, 4294443008, 4293918720,
+ (6,15): 4292870144, 4290772992, 4286578688, 4278190080, 4261412864,
+ (6,20): 4227858432, 4160749568, 4026531840, 3758096384, 3221225472,
+ (6,25): 2147483648, 0, 0, 0, 0, 0, 0,
+ (7,0): 4294967168, 4294967040, 4294966784, 4294966272, 4294965248,
+ (7,5): 4294963200, 4294959104, 4294950912, 4294934528, 4294901760,
+ (7,10): 4294836224, 4294705152, 4294443008, 4293918720, 4292870144,
+ (7,15): 4290772992, 4286578688, 4278190080, 4261412864, 4227858432,
+ (7,20): 4160749568, 4026531840, 3758096384, 3221225472, 2147483648, 0, 0,
+ (7,27): 0, 0, 0, 0, 0
+ }
+}
+}
diff --git a/tools/testfiles/tpbitsUnsignedWhole.ddl b/tools/testfiles/tpbitsUnsignedWhole.ddl
new file mode 100644
index 0000000..cae97b0
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedWhole.ddl
@@ -0,0 +1,20 @@
+#############################
+Expected output for 'h5dump -d /DU08BITS -M 0,8 packedbits.h5'
+#############################
+HDF5 "packedbits.h5" {
+DATASET "/DU08BITS" {
+ DATATYPE H5T_STD_U8LE
+ DATASPACE SIMPLE { ( 8, 8 ) / ( 8, 8 ) }
+ PACKED_BITS OFFSET=0 LENGTH=8
+ DATA {
+ (0,0): 255, 254, 252, 248, 240, 224, 192, 128,
+ (1,0): 254, 252, 248, 240, 224, 192, 128, 0,
+ (2,0): 252, 248, 240, 224, 192, 128, 0, 0,
+ (3,0): 248, 240, 224, 192, 128, 0, 0, 0,
+ (4,0): 240, 224, 192, 128, 0, 0, 0, 0,
+ (5,0): 224, 192, 128, 0, 0, 0, 0, 0,
+ (6,0): 192, 128, 0, 0, 0, 0, 0, 0,
+ (7,0): 128, 0, 0, 0, 0, 0, 0, 0
+ }
+}
+}