/* Read header/entry members in little-endian format. Returns the offset upto which the read was performed.  */
static size_t read_member(void *src, size_t offset, size_t size_bytes, void *dst)
/* Read header/entry members in little-endian format. Returns the offset upto which the read was performed.  */
static size_t read_member(void *src, size_t offset, size_t size_bytes, void *dst)
{
	switch (size_bytes) {
	case 1:
		*(uint8_t *)dst = read_at_le8(src, offset);
		break;
	case 2:
		*(uint16_t *)dst = read_at_le16(src, offset);
		break;
	case 4:
		*(uint32_t *)dst = read_at_le32(src, offset);
		break;
	case 8:
		*(uint64_t *)dst = read_at_le64(src, offset);
		break;
	default:
		ERROR("Read size not supported %zd\n", size_bytes);
		exit(-1);
	}
	return (offset + size_bytes);
}