What type of hex is this

i need to convert a website into hex . i was told to use File2Raw (File2Raw - Convert Files to Raw Binary Data) utility to convert it into Gzipped Hex data

the original data looks something like this,

 PROGMEM = { 
31,139,8,0,0,0,0,0,2,3,148,58,233,122,26,185,178,255,243,20,141,206,249,56,221,99,185,1,219,113,
98,136,236,155,197,158,53,147,57,217,102,33,190,254,68,119,1,74,26,137,145,4,14,99,243,238,183,164,110,209,
128,177,103,238,44,109,45,165,82,237,85,146,120,244,172,241,234,205,203,247,191,255,114,30,141,237,164,56,125,244,
204,253,137,10,46,71,12,228,233,35,236,3,207,79,31,69,248,207,179,9,88,30,101,99,174,13,88,54,179,195,
253,167,235,19,99,107,167,251,240,231,76,204,217,111,251,31,158,239,191,84,147,41,183,98,80,64,148,41,105,65,

however when i try to convert like they say i get data like this,

PROGMEM = { 0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xec,0xbd,0x6b,0x5b,0xdb,0xc8,0xb2,0x30,0xfa,0x7d,0x3d,0xcf,0xfa,0x0f,0xc6,0x3b,0x8b,0xb1,0x57,0x64,0x63,0x9b,0x4b,0x82,0x1d,0x85,0x93,0x00,0xc9,0x30,0x13,0x20,0x17,0x92,0x4c,0xc2,0x62,0xf3,0xc8,0x52,0xdb,0x08,0x6c,0xc9,0x4b,0x92,0x01,0x03,0x3e,0xff,0xe2,0x7c,0x3b,0xbf,0xee,0xfc,0x92,0x53,0x55,0x7d,0x97,0x64,0x93,0xc9,0x9e,0xbd,0xdf,0xf7,0xc3,0x3b,0x17,0x2c,0xf5,0xb5,0xba,0xba,0xba,0xba,0x6e,0xdd,0x7a,0x71,0x91,0x8d,0x47,0x95,0x91,0x17,0x0d,0xdd,0x2a,0x8b,0xaa

what is the difference in formats between the two chunks of data.

how can i convert my data so it is formatted right?

Arduino IDE wont compile it in the later format

Someone tell me how to get my hex in the proper format???

It looks fine.

Your original data is decimal numbers, and the converted data is hex numbers. But 31 is the same as 0x1F, and 139 is the same as 0x8b, and so on…

1 Like

If it does not compile show the full code and the full error message.
The snippets shown are incomplete so impossible for anyone to tell you the problem.

When i copied the data from the converter and pasted it into visual studio code it pasted it as 1 long string. when i moved the closing bracket to the end of the string it compiled. i guess it did not like the closing bracket on a newline.

Just to clarify i was using visual studio write .h for arduino sketch and compiling with arduino ide

So has the problem been solved?

Think of it this way

The first data set is Diet Coke in a 12 oz. bottle
The second dataset is Diet Coke in a aluminum can

if my code was diet coke i would delete it, smash the hard drive with a 50lb sledge hammer then soak it in concentrated boiling sulphuric acid then dispose of it in the middle of the atlantic ocean

Yes the problem has been resolved. @westfw made it clear my problem was elsewhere. thankyou

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.