TeamWin / Team-Win-Recovery-Project

Core recovery files for the Team Win Recovery Project (T.W.R.P) - this is not up to date, please see https://github.com/TeamWin/android_bootable_recovery/
http://twrp.me
1.95k stars 741 forks source link

Add support for 7z/LZMA1/LZMA2 to installing/updating system images #753

Open komarios opened 8 years ago

komarios commented 8 years ago

Add support for 7z/LZMA1/LZMA2 to installing/updating system images. This is very useful, since lzma2 compression is superior to zip compression and can incur lower download times for system image updates (e.g. cyanogenmod that has daily updates).

vortex-5 commented 8 years ago

True however LZMA / LZMA2 / 7z compression is much more memory intensive which may be an issue for phones limited to 1GB of ram.

komarios commented 8 years ago

I agree that 7zip needs a lot of memory for compression, but it does not need that much for de-compression. In the attached screenshot you can see that a recent version of CM13 (692MB) needs 710MB for compression and only 66MB for decompression (with high compression settings). The same file compressed to 293MB with 7z and to 362MB with zip (highest compression). It's almost 25% smaller! I think it deserves a second look! 7zip

komarios commented 8 years ago

I uploaded the window in Greek! Sorry! This is the English version. 7zip

komarios commented 8 years ago

One could implement the decompression method only, since it does not require but 1/10 of the memory needed for compression. Anyone have a different view on the subject? From lzma documentation :

  • Small memory requirements for decompressing (16 KB + DictionarySize)
  • Small code size for decompressing: 5-8 KB
nailyk-fr commented 8 years ago

Anyone have a different view on the subject?

new compression method should be implemented on both side (recovery and rom provider). Adding 7z method sounds good but may never be used and could provide unexpected results as rom with 7z will become twrp dependent. Example: twrp add 7z, cyanogenmod switch to 7z compression to provide their rom. Someone with cyanogenmod recovery (doesn't support 7z, no twrp available for the device) want to install cyanogenmod.7z , installation will not be possible.

So, maybe, this new feature should be requested at aosp first?

n054 commented 8 years ago

@nailyk-fr I downloaded a ROM toolbox that has a setting allowing all categories available for any kind of download like a tgz or zip, if I can not open a download though I would use the root browser of my ROM toolbox with a long press using a run-as app I would open it with zip on my toolbox app in recovery the download would be installed on my device. I had to put my recovery mode on the tarp recovery because I use many different sources for my builds and the other recovery mode didn't allow multiple sources.

n054 commented 8 years ago

That was supposed to be TWRP not tarp in that previous comment.

komarios commented 8 years ago

I agree with you (nailyk-fr) that the aosp provider needs to request/implement it first. So I have opened a ticket in cyanogenmod tracker too.

mirh commented 7 years ago

Guess like you should open a new ticket on Lineage