Zmiana metody kompresji na chunkowanie, zmiana nazwy z Void Archive na expak
This commit is contained in:
parent
f6150b0d17
commit
aef8daae9b
15 changed files with 320 additions and 93 deletions
|
|
@ -60,7 +60,7 @@ bool ViewCargo::View(const std::string& path)
|
|||
|
||||
headElements.push_back(ftxui::text(" Zip ") | ftxui::bold);
|
||||
headElements.push_back(ftxui::text("Nazwa pliku") | ftxui::bold | ftxui::size(ftxui::WIDTH, ftxui::EQUAL, 56));
|
||||
headElements.push_back(ftxui::text("CRC") | ftxui::bold | ftxui::size(ftxui::WIDTH, ftxui::EQUAL, 20));
|
||||
headElements.push_back(ftxui::text("Hash Name") | ftxui::bold | ftxui::size(ftxui::WIDTH, ftxui::EQUAL, 20));
|
||||
|
||||
filesList.push_back(hbox(std::move(headElements)));
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ bool ViewCargo::View(const std::string& path)
|
|||
bool ViewCargo::CheckCargoFile(const std::string& path)
|
||||
{
|
||||
std::vector<char> magic(signature.length());
|
||||
uint8_t cargoVer = 0;
|
||||
uint16_t cargoVer = 0;
|
||||
|
||||
std::ifstream cargo(path, std::ios::binary);
|
||||
|
||||
|
|
@ -139,14 +139,14 @@ void ViewCargo::GetFileList(const std::string& path)
|
|||
cargo.read(nameBuffor.data(), fhTmp.nameLen);
|
||||
fhTmp.nameFile = std::string(nameBuffor.begin(), nameBuffor.end());
|
||||
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.hashName), sizeof(fhTmp.hashName));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.offset), sizeof(fhTmp.offset));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.size), sizeof(fhTmp.size));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.rawSize), sizeof(fhTmp.rawSize));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.crc), sizeof(fhTmp.crc));
|
||||
cargo.read(reinterpret_cast<char*>(&fhTmp.isZip), sizeof(fhTmp.isZip));
|
||||
|
||||
//Tworzenie wierszy tabeli
|
||||
CreateTableRow(fhTmp.nameFile, fhTmp.isZip, fhTmp.crc);
|
||||
CreateTableRow(fhTmp.nameFile, fhTmp.isZip, fhTmp.hashName);
|
||||
}
|
||||
|
||||
cargo.close();
|
||||
|
|
@ -155,7 +155,7 @@ void ViewCargo::GetFileList(const std::string& path)
|
|||
//-----------------------------------------------------------------------------
|
||||
// Generowanie wierszy do tabeli
|
||||
//-----------------------------------------------------------------------------
|
||||
void ViewCargo::CreateTableRow(std::string file, bool zip, uint64_t hash)
|
||||
void ViewCargo::CreateTableRow(const std::string& file, const uint8_t& zip, const uint32_t& hash)
|
||||
{
|
||||
//Zamiania crc liczbowej na hex string
|
||||
std::stringstream ss;
|
||||
|
|
@ -166,13 +166,13 @@ void ViewCargo::CreateTableRow(std::string file, bool zip, uint64_t hash)
|
|||
ftxui::Element eZip;
|
||||
|
||||
//Dodawanie check boxa czy plik jest spakowany czy nie
|
||||
if (zip)
|
||||
if (zip == 1)
|
||||
{
|
||||
eZip = ftxui::text(" [x] ") | ftxui::color(ftxui::Color::Green);
|
||||
eZip = ftxui::text(" [x] ") | ftxui::color(ftxui::Color::Cyan);
|
||||
}
|
||||
else
|
||||
{
|
||||
eZip = ftxui::text(" [ ] ") | ftxui::color(ftxui::Color::Red);
|
||||
eZip = ftxui::text(" [ ] ") | ftxui::color(ftxui::Color::White);
|
||||
}
|
||||
|
||||
//Dodawanie komurek
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue