summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/CMakeLists.txt180
-rw-r--r--tools/h5dump/h5dump.c112
-rw-r--r--tools/h5dump/h5dumpgentest.c41
-rw-r--r--tools/h5dump/testh5dump.sh.in58
-rw-r--r--tools/lib/h5tools.c2
-rw-r--r--tools/lib/h5tools.h4
-rw-r--r--tools/lib/h5tools_str.c34
-rw-r--r--tools/testfiles/packedbits.h5bin7776 -> 15968 bytes
-rw-r--r--tools/testfiles/tpbitsCharLengthExceeded.ddl21
-rw-r--r--tools/testfiles/tpbitsCharOffsetExceeded.ddl21
-rw-r--r--tools/testfiles/tpbitsIntLengthExceeded.ddl21
-rw-r--r--tools/testfiles/tpbitsIntOffsetExceeded.ddl21
-rw-r--r--tools/testfiles/tpbitsLengthExceeded.ddl4
-rw-r--r--tools/testfiles/tpbitsLongLengthExceeded.ddl29
-rw-r--r--tools/testfiles/tpbitsLongOffsetExceeded.ddl29
-rw-r--r--tools/testfiles/tpbitsOffsetExceeded.ddl4
-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/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
50 files changed, 3469 insertions, 66 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index e830c75..91bc2d1 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c)
H5_NAMING (h5dump)
-TARGET_WIN_PROPERTIES (h5dump)
TARGET_LINK_LIBRARIES (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5dump)
@@ -30,7 +29,6 @@ IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
H5_NAMING (h5dumpgentest)
- TARGET_WIN_PROPERTIES (h5dumpgentest)
TARGET_LINK_LIBRARIES (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
@@ -395,14 +393,54 @@ IF (BUILD_TESTING)
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
)
SET (HDF5_REFERENCE_TEST_PBITS
packedbits.h5
@@ -1076,6 +1114,12 @@ IF (BUILD_TESTING)
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
@@ -1084,6 +1128,12 @@ IF (BUILD_TESTING)
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
@@ -1092,6 +1142,74 @@ IF (BUILD_TESTING)
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
)
# test failure handling
@@ -1099,14 +1217,52 @@ IF (BUILD_TESTING)
ADD_H5_TEST (tnofilename-with-packed-bits 1)
# Limits:
# Maximum number of packed bits is 8 (for now).
- # Maximum integer size is 8 (for now).
- # Maximun Offset is 7 (Maximum size - 1).
- # Maximum Offset+Length is 8 (Maximum size).
+ # 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.
@@ -1118,14 +1274,20 @@ IF (BUILD_TESTING)
# 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 7 (8-1) for now.
- ADD_H5_TEST (tpbitsOffsetExceeded 1 -d /DS08BITS -M 8,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 for now.
- ADD_H5_TEST (tpbitsLengthExceeded 1 -d /DS08BITS -M 2,7 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)
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index d990336..24438a8 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -93,7 +93,7 @@ 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 */
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
-static int display_packed_bits = FALSE; /*print 1-byte numbers as packed bits*/
+static int display_packed_bits = FALSE; /*print 1-8 byte numbers as packed bits*/
#endif
/* sort parameters */
@@ -102,9 +102,9 @@ static H5_iter_order_t sort_order = H5_ITER_INC; /*sort_order [ascending | d
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */
-#define PACKED_BITS_SIZE_MAX 8 /* Maximum bits size of integer types of packed-bits */
+#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 int packed_mask[PACKED_BITS_MAX]; /* packed bits are restricted to 1 byte */
+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];
@@ -131,7 +131,7 @@ static int indent; /*how far in to indent the line
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);
+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 );
@@ -2286,42 +2286,41 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
if(display_data) {
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
- int data_loop = 1;
- int i;
+ 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);
- packed_data_mask = packed_mask[i];
- packed_data_offset = packed_offset[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);
+ printf("DATA{ not yet implemented.}\n");
+ break;
- switch(H5Tget_class(type)) {
- case H5T_TIME:
- indentation(indent + COL);
- printf("DATA{ not yet implemented.}\n");
- break;
-
- case H5T_INTEGER:
- case H5T_FLOAT:
- case H5T_STRING:
- case H5T_BITFIELD:
- case H5T_OPAQUE:
- case H5T_COMPOUND:
- case H5T_REFERENCE:
- case H5T_ENUM:
- case H5T_VLEN:
- case H5T_ARRAY:
- dump_data(did, DATASET_DATA, sset, display_ai);
- break;
+ case H5T_INTEGER:
+ case H5T_FLOAT:
+ case H5T_STRING:
+ case H5T_BITFIELD:
+ case H5T_OPAQUE:
+ case H5T_COMPOUND:
+ case H5T_REFERENCE:
+ case H5T_ENUM:
+ case H5T_VLEN:
+ case H5T_ARRAY:
+ dump_data(did, DATASET_DATA, sset, display_ai);
+ break;
- default:
- break;
- } /* end switch */
+ default:
+ break;
+ } /* end switch */
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
- }
+ } /* for(i=0;i<data_loop;i++) */
#endif
}
@@ -2700,9 +2699,49 @@ dump_oid(hid_t oid)
*-------------------------------------------------------------------------
*/
static void
-dump_packed_bits(unsigned int packed_index)
+dump_packed_bits(unsigned int packed_index, hid_t type)
{
+ int packed_bits_size = 0;
+ if(H5Tget_class(type)==H5T_INTEGER) {
+ if(H5Tequal(type, H5T_NATIVE_SCHAR) == TRUE) {
+ packed_bits_size = 8 * sizeof(char);
+ }
+ else if(H5Tequal(type, H5T_NATIVE_UCHAR) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned char);
+ }
+ else if(H5Tequal(type, H5T_NATIVE_SHORT) == TRUE) {
+ packed_bits_size = 8 * sizeof(short);
+ }
+ else if(H5Tequal(type, H5T_NATIVE_USHORT) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned short);
+ }
+ else if(H5Tequal(type, H5T_NATIVE_INT) == TRUE) {
+ packed_bits_size = 8 * sizeof(int);
+ }
+ else if(H5Tequal(type, H5T_NATIVE_UINT) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned int);
+ }
+ else if(H5Tequal(type, H5T_NATIVE_LONG) == TRUE) {
+ packed_bits_size = 8 * sizeof(long);
+ }
+ else if(H5Tequal(type, H5T_NATIVE_ULONG) == TRUE) {
+ packed_bits_size = 8 * sizeof(unsigned long);
+ }
+ else if(H5Tequal(type, H5T_NATIVE_LLONG) == TRUE) {
+ packed_bits_size = 8 * sizeof(long long);
+ }
+ else if(H5Tequal(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
@@ -3674,7 +3713,10 @@ parse_mask_list(const char *h_list)
/* 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. */
- packed_mask[packed_bits_num] = ~(~0<<length_value);
+ if(length_value<8*sizeof(unsigned long long))
+ packed_mask[packed_bits_num] = ~(~0L<<length_value);
+ else
+ packed_mask[packed_bits_num] = ~0L;
packed_bits_num++;
/* skip a possible comma separator */
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 42589ad..9f8d277 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -255,6 +255,9 @@ typedef struct s1_t {
#define F66_DATASETU32 "DU32BITS"
#define F66_DATASETS32 "DS32BITS"
#define F66_YDIM32 32
+#define F66_DATASETU64 "DU64BITS"
+#define F66_DATASETS64 "DS64BITS"
+#define F66_YDIM64 64
#define F66_DUMMYDBL "DummyDBL"
static void
@@ -6771,9 +6774,11 @@ gent_packedbits(void)
uint8_t dsetu8[F66_XDIM][F66_YDIM8], valu8bits;
uint16_t dsetu16[F66_XDIM][F66_YDIM16], valu16bits;
uint32_t dsetu32[F66_XDIM][F66_YDIM32], valu32bits;
+ uint64_t dsetu64[F66_XDIM][F66_YDIM64], valu64bits;
int8_t dset8[F66_XDIM][F66_YDIM8], val8bits;
int16_t dset16[F66_XDIM][F66_YDIM16], val16bits;
int32_t dset32[F66_XDIM][F66_YDIM32], val32bits;
+ int64_t dset64[F66_XDIM][F66_YDIM64], val64bits;
double dsetdbl[F66_XDIM][F66_YDIM8];
unsigned int i, j;
@@ -6833,6 +6838,24 @@ gent_packedbits(void)
H5Sclose(space);
H5Dclose(dataset);
+ /* Dataset of 64 bits unsigned int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM64;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETU64, H5T_STD_U64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ valu64bits = (uint64_t) ~0Lu; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dsetu64[i][0] = valu64bits;
+ for(j = 1; j < dims[1]; j++) {
+ dsetu64[i][j] = dsetu64[i][j-1] << 1;
+ }
+ valu64bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_UINT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dsetu64);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
/* Dataset of 8 bits signed int */
dims[0] = F66_XDIM; dims[1] = F66_YDIM8;
space = H5Screate_simple(2, dims, NULL);
@@ -6887,6 +6910,24 @@ gent_packedbits(void)
H5Sclose(space);
H5Dclose(dataset);
+ /* Dataset of 64 bits signed int */
+ dims[0] = F66_XDIM; dims[1] = F66_YDIM64;
+ space = H5Screate_simple(2, dims, NULL);
+ dataset = H5Dcreate2(fid, F66_DATASETS64, H5T_STD_I64LE, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ val64bits = (int64_t) ~0L; /* all 1s */
+ for(i = 0; i < dims[0]; i++){
+ dset64[i][0] = val64bits;
+ for(j = 1; j < dims[1]; j++) {
+ dset64[i][j] = dset64[i][j-1] << 1;
+ }
+ val64bits <<= 1;
+ }
+
+ H5Dwrite(dataset, H5T_NATIVE_INT64, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset64);
+ H5Sclose(space);
+ H5Dclose(dataset);
+
/* Double Dummy set for failure tests */
dims[0] = F66_XDIM; dims[1] = F66_YDIM8;
space = H5Screate_simple(2, dims, NULL);
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index d4d8944..b38c27a 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -589,14 +589,52 @@ else
fi
# Limits:
# Maximum number of packed bits is 8 (for now).
-# Maximum integer size is 8 (for now).
-# Maximun Offset is 7 (Maximum size - 1).
-# Maximum Offset+Length is 8 (Maximum size).
+# 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 tpbitsSigned.ddl -d /DS08BITS -M 0,2,2,6 packedbits.h5
-$xCMD tpbitsUnsigned.ddl -d /DU08BITS -M 0,2,2,6 packedbits.h5
+$xCMD tpbitsSignedWhole -d /DS08BITS -M 0,8 packedbits.h5
+$xCMD tpbitsUnsignedWhole -d /DU08BITS -M 0,8 packedbits.h5
+$xCMD tpbitsSignedIntWhole -d /DS16BITS -M 0,16 packedbits.h5
+$xCMD tpbitsUnsignedIntWhole -d /DU16BITS -M 0,16 packedbits.h5
+$xCMD tpbitsSignedLongWhole -d /DS32BITS -M 0,32 packedbits.h5
+$xCMD tpbitsUnsignedLongWhole -d /DU32BITS -M 0,32 packedbits.h5
+$xCMD tpbitsSignedLongLongWhole -d /DS64BITS -M 0,64 packedbits.h5
+$xCMD tpbitsUnsignedLongLongWhole -d /DU64BITS -M 0,64 packedbits.h5
+$xCMD tpbitsSignedLongLongWhole63 -d /DS64BITS -M 0,63 packedbits.h5
+$xCMD tpbitsUnsignedLongLongWhole63 -d /DU64BITS -M 0,63 packedbits.h5
+$xCMD tpbitsSignedLongLongWhole1 -d /DS64BITS -M 1,63 packedbits.h5
+$xCMD tpbitsUnsignedLongLongWhole1 -d /DU64BITS -M 1,63 packedbits.h5
+# Half sections
+$xCMD tpbitsSigned4 -d /DS08BITS -M 0,4,4,4 packedbits.h5
+$xCMD tpbitsUnsigned4 -d /DU08BITS -M 0,4,4,4 packedbits.h5
+$xCMD tpbitsSignedInt8 -d /DS16BITS -M 0,8,8,8 packedbits.h5
+$xCMD tpbitsUnsignedInt8 -d /DU16BITS -M 0,8,8,8 packedbits.h5
+$xCMD tpbitsSignedLong16 -d /DS32BITS -M 0,16,16,16 packedbits.h5
+$xCMD tpbitsUnsignedLong16 -d /DU32BITS -M 0,16,16,16 packedbits.h5
+$xCMD tpbitsSignedLongLong32 -d /DS64BITS -M 0,32,32,32 packedbits.h5
+$xCMD tpbitsUnsignedLongLong32 -d /DU64BITS -M 0,32,32,32 packedbits.h5
+# Quarter sections
+$xCMD tpbitsSigned2 -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
+$xCMD tpbitsUnsigned2 -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5
+$xCMD tpbitsSignedInt4 -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
+$xCMD tpbitsUnsignedInt4 -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5
+$xCMD tpbitsSignedLong8 -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
+$xCMD tpbitsUnsignedLong8 -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5
+$xCMD tpbitsSignedLongLong16 -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
+$xCMD tpbitsUnsignedLongLong16 -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5
+# Begin and End
+$xCMD tpbitsSigned -d /DS08BITS -M 0,2,2,6 packedbits.h5
+$xCMD tpbitsUnsigned -d /DU08BITS -M 0,2,2,6 packedbits.h5
+$xCMD tpbitsSignedInt -d /DS16BITS -M 0,2,10,6 packedbits.h5
+$xCMD tpbitsUnsignedInt -d /DU16BITS -M 0,2,10,6 packedbits.h5
+$xCMD tpbitsSignedLong -d /DS32BITS -M 0,2,26,6 packedbits.h5
+$xCMD tpbitsUnsignedLong -d /DU32BITS -M 0,2,26,6 packedbits.h5
+$xCMD tpbitsSignedLongLong -d /DS64BITS -M 0,2,58,6 packedbits.h5
+$xCMD tpbitsUnsignedLongLong -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.
@@ -609,13 +647,19 @@ $xCMD tpbitsArray.ddl -d /Dataset1 -M 0,1,1,1 tarray1.h5
# 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 8,1 packedbits.h5
+$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 2,7 packedbits.h5
+$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
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 2cf778f..9b25ccb 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -45,7 +45,7 @@ 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 int packed_data_mask; /* mask in which packed bits to display */
+unsigned long long packed_data_mask; /* mask in which packed bits to display */
#endif
static h5tool_format_t h5tools_dataformat = {
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 0c919ae..c7836a9 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -532,8 +532,8 @@ extern "C" {
#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 int packed_data_mask; /* mask in which 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 */
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 46ad8c9..1dcfda5 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -783,16 +783,18 @@ 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)
+ 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)
+ if(packed_bits_num) {
tempuint = (tempuint >> packed_data_offset) & packed_data_mask;
+ }
#endif
h5tools_str_append(str, OPT(info->fmt_uint, "%u"), tempuint);
}
@@ -800,8 +802,9 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
char tempchar;
HDmemcpy(&tempchar, cp_vp, sizeof(char));
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
- if(packed_bits_num)
+ if(packed_bits_num) {
tempchar = (tempchar >> packed_data_offset) & packed_data_mask;
+ }
#endif
h5tools_str_append(str, OPT(info->fmt_schar, "%d"), tempchar);
}
@@ -809,8 +812,9 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
unsigned char tempuchar;
HDmemcpy(&tempuchar, ucp_vp, sizeof(unsigned char));
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
- if(packed_bits_num)
+ if(packed_bits_num) {
tempuchar = (tempuchar >> packed_data_offset) & packed_data_mask;
+ }
#endif
h5tools_str_append(str, OPT(info->fmt_uchar, "%u"), tempuchar);
}
@@ -819,8 +823,9 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
HDmemcpy(&tempshort, vp, sizeof(short));
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
- if(packed_bits_num)
+ if(packed_bits_num) {
tempshort = (tempshort >> packed_data_offset) & packed_data_mask;
+ }
#endif
h5tools_str_append(str, OPT(info->fmt_short, "%d"), tempshort);
}
@@ -829,33 +834,46 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
HDmemcpy(&tempushort, vp, sizeof(unsigned short));
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
- if(packed_bits_num)
+ 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)
+ 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)
+ 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/packedbits.h5 b/tools/testfiles/packedbits.h5
index ad7333f..cbb73ab 100644
--- a/tools/testfiles/packedbits.h5
+++ b/tools/testfiles/packedbits.h5
Binary files differ
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/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..e5746e4
--- /dev/null
+++ b/tools/testfiles/tpbitsIntOffsetExceeded.ddl
@@ -0,0 +1,21 @@
+#############################
+Expected output for 'h5dump -d /DS32BITS -M 32,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
index 9220d9e..744731d 100644
--- a/tools/testfiles/tpbitsLengthExceeded.ddl
+++ b/tools/testfiles/tpbitsLengthExceeded.ddl
@@ -1,5 +1,5 @@
#############################
-Expected output for 'h5dump -d /DS08BITS -M 2,7 packedbits.h5'
+Expected output for 'h5dump -d /DS08BITS -M 37,28 packedbits.h5'
#############################
usage: h5dump [OPTIONS] file
OPTIONS
@@ -93,4 +93,4 @@ usage: h5dump [OPTIONS] file
h5dump -d /dset -M 0,1,4,3 quux.h5
-h5dump error: Packed Bit offset+length value(9) too large. Max is 8
+h5dump error: Packed Bit offset+length value(65) too large. Max is 64
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/tpbitsOffsetExceeded.ddl b/tools/testfiles/tpbitsOffsetExceeded.ddl
index 2859b5e..c471d41 100644
--- a/tools/testfiles/tpbitsOffsetExceeded.ddl
+++ b/tools/testfiles/tpbitsOffsetExceeded.ddl
@@ -1,5 +1,5 @@
#############################
-Expected output for 'h5dump -d /DS08BITS -M 8,1 packedbits.h5'
+Expected output for 'h5dump -d /DS08BITS -M 64,1 packedbits.h5'
#############################
usage: h5dump [OPTIONS] file
OPTIONS
@@ -93,4 +93,4 @@ usage: h5dump [OPTIONS] file
h5dump -d /dset -M 0,1,4,3 quux.h5
-h5dump error: Packed Bit offset value(8) must be between 0 and 7
+h5dump error: Packed Bit offset value(64) must be between 0 and 63
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..b7aef5e
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedInt.ddl
@@ -0,0 +1,31 @@
+#############################
+Expected output for 'h5dump -d /DS16BITS -M 0,2,8,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..de5c9a3
--- /dev/null
+++ b/tools/testfiles/tpbitsSignedLong.ddl
@@ -0,0 +1,47 @@
+#############################
+Expected output for 'h5dump -d /DS32BITS -M 0,2,16,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/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..d499729
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedInt.ddl
@@ -0,0 +1,31 @@
+#############################
+Expected output for 'h5dump -d /DU16BITS -M 0,2,8,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..727b963
--- /dev/null
+++ b/tools/testfiles/tpbitsUnsignedLong.ddl
@@ -0,0 +1,47 @@
+#############################
+Expected output for 'h5dump -d /DU32BITS -M 0,2,16,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
+ }
+}
+}