I want to use LZO to compress a array of int or byte. So I need to copy the int array to a *char then I will compress and save to file. And after i need do reverse operation. I will open the file read it with *Char and the decompress to array of int.
I don't want to do a look in the *char to convert each int. Is the any way to do this quickily?
char *entrada;
int *arrayInt2;
int arrayInt1[100];
int ctr;
for(ctr=0;ctr<=100; ctr++)
{
arrayInt1[ctr] = ctr;
}
entrada = reinterpret_cast<char *>(arrayInt1);
arrayInt2 = reinterpret_cast<int *>(entrada);
return 0;
I want something like this. Is this correct? Thanks