# Path: pyfive/core.py
# def _padded_size(size, padding_multipe=8):
#     """ Return the size of a field padded to be a multiple a give value. """
#     return int(ceil(size / padding_multipe) * padding_multipe)
# 
# def _structure_size(structure):
#     """ Return the size of a structure in bytes. """
#     fmt = '<' + ''.join(structure.values())
#     return struct.calcsize(fmt)
# 
# def _unpack_struct_from(structure, buf, offset=0):
#     """ Unpack a structure into an OrderedDict from a buffer of bytes. """
#     fmt = '<' + ''.join(structure.values())
#     values = struct.unpack_from(fmt, buf, offset=offset)
#     return OrderedDict(zip(structure.keys(), values))
# 
# Path: pyfive/core.py
# class InvalidHDF5File(Exception):
#     """ Exception raised when an invalid HDF5 file is detected. """
#     pass


from collections import OrderedDict
from .core import _padded_size, _structure_size, _unpack_struct_from
from .core import InvalidHDF5File
            byte_order_char = '<'  # little-endian
        else:
            byte_order_char = '>'  # big-endian

        # 12-bytes floating-point property description
        # not read, assumed to be IEEE standard format
        self.offset += 12

        return byte_order_char + dtype_char + str(length_in_bytes)

    @staticmethod
    def _determine_dtype_string(datatype_msg):
        """ Return the NumPy dtype for a string class. """
        return 'S' + str(datatype_msg['size'])

    def _determine_dtype_compound(self, datatype_msg):
        """ Return the dtype of a compound class if supported. """
        bit_field_0 = datatype_msg['class_bit_field_0']
        bit_field_1 = datatype_msg['class_bit_field_1']
        n_comp = bit_field_0 + (bit_field_1 << 4)

        # read in the members of the compound datatype
        members = []
        for _ in range(n_comp):
            null_location = self.buf.index(b'\x00', self.offset)
            name_size = _padded_size(null_location - self.offset, 8)
            name = self.buf[self.offset:self.offset+name_size]
            name = name.strip(b'\x00').decode('utf-8')
            self.offset += name_size


# Path: pyfive/core.py
# def _padded_size(size, padding_multipe=8):
#     """ Return the size of a field padded to be a multiple a give value. """
#     return int(ceil(size / padding_multipe) * padding_multipe)
# 
# def _structure_size(structure):
#     """ Return the size of a structure in bytes. """
#     fmt = '<' + ''.join(structure.values())
#     return struct.calcsize(fmt)
# 
# def _unpack_struct_from(structure, buf, offset=0):
#     """ Unpack a structure into an OrderedDict from a buffer of bytes. """
#     fmt = '<' + ''.join(structure.values())
#     values = struct.unpack_from(fmt, buf, offset=offset)
#     return OrderedDict(zip(structure.keys(), values))
# 
# Path: pyfive/core.py
# class InvalidHDF5File(Exception):
#     """ Exception raised when an invalid HDF5 file is detected. """
#     pass


# Path: pyfive/datatype_msg.py
from collections import OrderedDict
from .core import _padded_size, _structure_size, _unpack_struct_from
from .core import InvalidHDF5File

            byte_order_char = '<'  # little-endian
        else:
            byte_order_char = '>'  # big-endian

        # 12-bytes floating-point property description
        # not read, assumed to be IEEE standard format
        self.offset += 12

        return byte_order_char + dtype_char + str(length_in_bytes)

    @staticmethod
    def _determine_dtype_string(datatype_msg):
        """ Return the NumPy dtype for a string class. """
        return 'S' + str(datatype_msg['size'])

    def _determine_dtype_compound(self, datatype_msg):
        """ Return the dtype of a compound class if supported. """
        bit_field_0 = datatype_msg['class_bit_field_0']
        bit_field_1 = datatype_msg['class_bit_field_1']
        n_comp = bit_field_0 + (bit_field_1 << 4)

        # read in the members of the compound datatype
        members = []
        for _ in range(n_comp):
            null_location = self.buf.index(b'\x00', self.offset)
            name_size = _padded_size(null_location - self.offset, 8)
            name = self.buf[self.offset:self.offset+name_size]
            name = name.strip(b'\x00').decode('utf-8')
            self.offset += name_size


            prop_desc = _unpack_struct_from(