Merge pull request 'Usunięto TUI, Zmieniono strukturę PAK... agan, Rezygnacja z FNV hash jako referencji, Zmieana wartości flag na maski' (#12) from Wywołanie_i/o into master
Reviewed-on: #12
This commit is contained in:
commit
0ffd302de6
16 changed files with 86 additions and 575 deletions
|
|
@ -20,7 +20,7 @@ std::vector<char> ChunkManager::chunked(const std::vector<char>& raw, const bool
|
|||
const size_t maxBlockSize = BLOCK_SIZE;
|
||||
const size_t rawSize = raw.size();
|
||||
|
||||
uint16_t blockLen = 0;
|
||||
uint32_t blockLen = 0;
|
||||
uint32_t lastChunkRawSize;
|
||||
std::vector<char> compressedBlocks;
|
||||
for (size_t offset = 0; offset < rawSize; offset += maxBlockSize)
|
||||
|
|
@ -45,8 +45,8 @@ std::vector<char> ChunkManager::chunked(const std::vector<char>& raw, const bool
|
|||
// Zmiana rozmiaru do faktycznego rozmiaru po kompresji
|
||||
zipChunk.resize(zipSize);
|
||||
|
||||
uint32_t chs = chunk.size();
|
||||
uint32_t zch = outChunk.size();
|
||||
uint32_t chs = static_cast<uint32_t>(chunk.size());
|
||||
uint32_t zch = static_cast<uint32_t>(outChunk.size());
|
||||
|
||||
//addIntToVector<uint32_t>(compressedBlocks, chs);
|
||||
lastChunkRawSize = chs;
|
||||
|
|
@ -60,7 +60,7 @@ std::vector<char> ChunkManager::chunked(const std::vector<char>& raw, const bool
|
|||
// Wstaw liczbê o iloœci bloków do vectora;
|
||||
// Przekonpwertuj usigned int32 na ci¹g znkaów
|
||||
// uint16_t blockLen = blockSizes .size();
|
||||
addIntToVector<uint16_t>(zip, blockLen);
|
||||
addIntToVector<uint32_t>(zip, blockLen);
|
||||
addIntToVector<uint32_t>(zip, maxBlockSize);
|
||||
addIntToVector<uint32_t>(zip, lastChunkRawSize);
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ std::vector<char> ChunkManager::chunked(const std::vector<char>& raw, const bool
|
|||
std::vector<char> ChunkManager::dechunked(const std::vector<char>& zip, const bool& compress, const bool& encrypt)
|
||||
{
|
||||
size_t offset = 0;
|
||||
const uint16_t chunkLen = getIntFromVector<uint16_t>(zip, offset);
|
||||
const uint32_t chunkLen = getIntFromVector<uint32_t>(zip, offset);
|
||||
const uint32_t chunkBeforeSize = getIntFromVector<uint32_t>(zip, offset);
|
||||
const uint32_t chunkLastSize = getIntFromVector<uint32_t>(zip, offset);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue