Usunięto TUI, Zmieniono strukturę PAK... agan, Rezygnacja z FNV hash jako referencji, Zmieana wartości flag na maski
This commit is contained in:
parent
a84a69cbd6
commit
91aaa279ec
16 changed files with 86 additions and 575 deletions
|
|
@ -40,7 +40,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)
|
||||
|
|
@ -68,8 +68,8 @@ std::vector<char> ChunkManager::chunked(const std::vector<char>& raw, const bool
|
|||
outChunk = encrypt ? eman.encrypt(chunk) : std::move(chunk);
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
@ -83,7 +83,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);
|
||||
|
||||
|
|
@ -101,7 +101,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