I need to convert this byte array into suint64_t. Because I think using uint64_t is better that byte array because it's save the code space. I saw this sample from this website
When we are lighting this symbol with LED Matrix we use byte array.

I need to convert Byte Array :
const byte IMAGES[][8] = {
{
B11000000,
B01100000,
B00110000,
B00011000,
B00110000,
B01100000,
B11000000,
B00000000
}};
const int IMAGES_LEN = sizeof(IMAGES)/8;
Into This uint64_t:
const uint64_t IMAGES[] = {
0x0003060c180c0603
};
const int IMAGES_LEN = sizeof(IMAGES)/8;

you could use a union
untested:
union ImageData{
byte image8x8[8];
byte image64;
};
const ImageData images[] = {
{
B11000000,
B01100000,
B00110000,
B00011000,
B00110000,
B01100000,
B11000000,
B00000000
},
{
B01000000,
B00100000,
B00010000,
B00001000,
B00010000,
B00100000,
B01000000,
B10000000
}
};
void setup(void)
{
Serial.begin(9600);
for(int j = 0; j = sizeof(images)/sizeof(images[0]); j++)
{
for(int i = 0; i < 8; i++)
{
if(images[j].image8x8[7 - i] < 0x10) Serial.print("0");
Serial.print(images[j].image8x8[7 - i], HEX);
}
Serial.println();
Serial.println(images[j].image64, HEX);
}
}
void loop(void)
{
}
But it doesn't save space....
64 bits as (8 unit8_t x 8 bits) or (1 uint64_t x 64 bits) takes exactly the same amount of space.
What's the point of doing that (uint64)? To send the data out, you need to break it back into bytes to use things like SPI,transfer() to send the data out quickly, such as to a MAX7219 to control an 8x8 LED matrix, or 8 shift registers if the matrix is not multiplexed.