diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2014-02-10 20:09:20 +0100 |
---|---|---|
committer | Dees Troy <dees_troy@teamw.in> | 2014-02-12 16:12:06 +0100 |
commit | a869eddeb996f764a463fc14e5489eb27c2fd59e (patch) | |
tree | e0d442f689259c6b814ca7ad1b0cf99faef02713 | |
parent | ifdef some functions that depend on other TWRP parts (diff) | |
download | android_bootable_recovery-a869eddeb996f764a463fc14e5489eb27c2fd59e.tar android_bootable_recovery-a869eddeb996f764a463fc14e5489eb27c2fd59e.tar.gz android_bootable_recovery-a869eddeb996f764a463fc14e5489eb27c2fd59e.tar.bz2 android_bootable_recovery-a869eddeb996f764a463fc14e5489eb27c2fd59e.tar.lz android_bootable_recovery-a869eddeb996f764a463fc14e5489eb27c2fd59e.tar.xz android_bootable_recovery-a869eddeb996f764a463fc14e5489eb27c2fd59e.tar.zst android_bootable_recovery-a869eddeb996f764a463fc14e5489eb27c2fd59e.zip |
-rw-r--r-- | twrp-functions.hpp | 1 | ||||
-rw-r--r-- | twrpTar.cpp | 32 | ||||
-rw-r--r-- | twrpTar.hpp | 2 |
3 files changed, 0 insertions, 35 deletions
diff --git a/twrp-functions.hpp b/twrp-functions.hpp index 6e93805d9..661ca02db 100644 --- a/twrp-functions.hpp +++ b/twrp-functions.hpp @@ -49,7 +49,6 @@ public: static int Get_File_Type(string fn); // Determines file type, 0 for unknown, 1 for gzip, 2 for OAES encrypted static int Try_Decrypting_File(string fn, string password); // -1 for some error, 0 for failed to decrypt, 1 for decrypted, 3 for decrypted and found gzip format static unsigned long Get_File_Size(string Path); // Returns the size of a file - static vector<string> split_string(const string &in, char del, bool skip_empty); #ifndef BUILD_TWRPTAR_MAIN static void install_htc_dumlock(void); // Installs HTC Dumlock diff --git a/twrpTar.cpp b/twrpTar.cpp index ee9d9dcb7..cc09b78ab 100644 --- a/twrpTar.cpp +++ b/twrpTar.cpp @@ -1114,38 +1114,6 @@ int twrpTar::entryExists(string entry) { return ret; } -unsigned long long twrpTar::uncompressedSize() { - int type = 0; - unsigned long long total_size = 0; - string Tar, Command, result; - vector<string> split; - - Tar = TWFunc::Get_Filename(tarfn); - type = TWFunc::Get_File_Type(tarfn); - if (type == 0) - total_size = TWFunc::Get_File_Size(tarfn); - else { - Command = "pigz -l " + tarfn; - /* if we set Command = "pigz -l " + tarfn + " | sed '1d' | cut -f5 -d' '"; - we get the uncompressed size at once. */ - TWFunc::Exec_Cmd(Command, result); - if (!result.empty()) { - /* Expected output: - compressed original reduced name - 95855838 179403776 -1.3% data.yaffs2.win - ^ - split[5] - */ - split = TWFunc::split_string(result, ' ', true); - if (split.size() > 4) - total_size = atoi(split[5].c_str()); - } - } - LOGINFO("%s's uncompressed size: %llu bytes\n", Tar.c_str(), total_size); - - return total_size; -} - extern "C" ssize_t write_tar(int fd, const void *buffer, size_t size) { return (ssize_t) write_libtar_buffer(fd, buffer, size); } diff --git a/twrpTar.hpp b/twrpTar.hpp index 02d4b8004..a42dea0e1 100644 --- a/twrpTar.hpp +++ b/twrpTar.hpp @@ -52,8 +52,6 @@ public: void setdir(string dir); void setsize(unsigned long long backup_size); void setpassword(string pass); - - unsigned long long uncompressedSize(); public: int use_encryption; |