mylong* readFullFile(int n, int t, mylong& sizeFile, mylong & padded_size) {
- ifstream stream("lena.png", ios::in | ios::binary | ios::ate);
+// ifstream stream("lena.png", ios::in | ios::binary | ios::ate);
// ifstream stream("lena_small.png", ios::in | ios::binary | ios::ate);
-// ifstream stream("/home/couturie/Downloads/CARCARIASS.zip", ios::in | ios::binary | ios::ate);
+ ifstream stream("/home/couturie/Downloads/CARCARIASS.zip", ios::in | ios::binary | ios::ate);
sizeFile=stream.tellg();
std::cout << sizeFile << std::endl;
mylong *identity;
- int size=5000000;
+// int size=5000000;
int t=3;
int n=5;
//Save trunks
for(int i=0;i<n;i++) {
stringstream ss;
- ss <<"lena_"<<i<<".png";
+ ss <<"file_"<<i<<".dat";
string str = ss.str();
saveFile((uint8_t*)&matC[i*len], str.c_str(),len*sizeof(mylong));
// sendChunk( str,i);
stringstream ss;
- ss <<"lena_"<<i<<".png";
+ ss <<"file_"<<i<<".dat";
string str = ss.str();
// retrieveChunk(str,i);
stringstream ss;
- ss <<"lena_"<<i<<".png";
+ ss <<"file_"<<i<<".dat";
string str = ss.str();
th[ii].join();
readFile((uint8_t*)&matCs[ind*len], str.c_str(),len*sizeof(mylong));
//first elements that contains the size is removed
uint8_t *reconstucted_data=reinterpret_cast<uint8_t*>(&matS2[1]);
- saveFile(reconstucted_data, "lena2.png",new_size);
+ saveFile(reconstucted_data, "file.dat",new_size);
return 0;
}