Naprawiony błąd z deszyfracją, strumieniowe wypakowywanie danych skończone
This commit is contained in:
parent
6b0fbed103
commit
aea66dbfd9
8 changed files with 5 additions and 286 deletions
|
|
@ -241,7 +241,6 @@ std::vector<FilesTable> CreateCargo::ComputingHeadFiles()
|
|||
// Dodaj do kontenera konfiguracjê chunków
|
||||
if (file.parameter != flag::raw)
|
||||
{
|
||||
std::cout << "CHUNK PARAM" << std::endl;
|
||||
cargo.write(reinterpret_cast<const char*>(&quantity), sizeof(quantity));
|
||||
cargo.write(reinterpret_cast<const char*>(&chunkBlockSize), sizeof(chunkBlockSize));
|
||||
cargo.write(reinterpret_cast<const char*>(&lastChunkSize), sizeof(lastChunkSize));
|
||||
|
|
@ -288,8 +287,7 @@ std::vector<FilesTable> CreateCargo::ComputingHeadFiles()
|
|||
else
|
||||
{
|
||||
// Zaszyfruj lub skopiuj
|
||||
outChunk = (file.parameter & flag::enc) == flag::enc ?
|
||||
eman.encrypt(cman.compress(chunk)) : cman.compress(chunk);
|
||||
outChunk = eman.encrypt(chunk);
|
||||
}
|
||||
|
||||
const uint32_t outSize = outChunk.size();
|
||||
|
|
@ -300,19 +298,11 @@ std::vector<FilesTable> CreateCargo::ComputingHeadFiles()
|
|||
cargo.write(reinterpret_cast<const char*>(outChunk.data()), outChunk.size());
|
||||
sizeFile += outSize;
|
||||
}
|
||||
std::cout << "SIZE: " << sizeFile << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
f.close();
|
||||
|
||||
//Tworzenie hashu CRC
|
||||
//const uint64_t crc = XXH64(buffer.data(), buffer.size(), 0);
|
||||
|
||||
//Kompresjia
|
||||
//std::vector<char> pakBuffer;
|
||||
//computingBytes(file.parameter, buffer, pakBuffer);
|
||||
|
||||
FilesTable ft;
|
||||
ft.nameFile = path;
|
||||
ft.nameLen = path.length();
|
||||
|
|
@ -321,8 +311,6 @@ std::vector<FilesTable> CreateCargo::ComputingHeadFiles()
|
|||
ft.flag = file.parameter;
|
||||
ft.crc = XXH64_digest(xxhState);
|
||||
|
||||
//cargo.write(reinterpret_cast<const char*>(pakBuffer.data()), pakBuffer.size());
|
||||
|
||||
filesTable.push_back(ft);
|
||||
offset += sizeFile;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue