How to write an array of bytes to eeprom

Hi all,ime wanting to know how i would wright an array of bytes to eeprom on esp8266.

ive an led pattern in a header file like this bellow.
ive cut some bytes off the patterns so its not too big for this post.

#ifndef DefaultPatterns_h
#define DefaultPatterns_h

#define DEFAULT_SIZE 147
const byte defaultData[DEFAULT_SIZE] PROGMEM = {0,0,0,0,0,0,0,0,0,251,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,255,0,255,170,0,251,255,0,0,0,0,0,0,0,0,0,0,251,255,0,255,170,0,255,0,0,255,170,0,251,255,0,0,0,0,251,255,0,255,170,0,255,0,0,255,255,255,255,0,0,255,170,0,251,255,0,0,0,0,251,255,0,255,170,0,255,0,0,255,170,0,251,255,0,0,0,0,0,0,0,0,0,0,251,255,0,255,170,0,251,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,251,255,0,0,0,0,0,0,0,0,0,0};

#define RAINBOWPIXEL_SIZE 972
const byte rainbowpixelData[RAINBOWPIXEL_SIZE] PROGMEM = {255,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,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,0,0,0,0,0,0};

#endif

ive cut some bytes off so its not too big for this post

Hear is my sketch bellow.

#include <EEPROM.h>
#include "defaultPatterns.h"

int addr = 0;// the current address in the EEPROM (i.e. which byte we're going to write to next)

void setup()
{
EEPROM.begin(512);
}

void loop(){
Serial.begin(9600);

const byte somedata[] = (defaultData,DEFAULT_SIZE, PROGMEM);// stuck on this part hear.!!!!!!

// EEPROM.write(addr, val);// was like this before.

EEPROM.write(addr,byte,somedata, sizeof(somedata)); // Stuck on this part hear.!!!!!!!!!!!!

addr = addr + 1;
if (addr == 512)
{
addr = 0;
EEPROM.commit();
}

delay(100);
}

Any help would be great

Why do you want to do that? The data is already in flash memory (progmem). The ESP8266 doesn't have EEPROM, it just uses flash to emulate EEPROM. So you're writing from flash memory to flash memory.

Also posted at:arduino - Write an array of bytes to EEPROM from PROGMEM - Stack Overflow

If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. When you post links please always use the chain links icon on the toolbar to make them clickable.