Comments (4)
- 最简单的方案:diff的时候控制一下压缩字典大小; 比如单个4MB或8MB; 一般手机上应该都没有问题了。
- 麻烦一点的方案:替换使用的diff&patch算法; 比如将 程序中默认调用的diff函数
create_compressed_diff_block()
替换为create_single_compressed_diff_block()
,程序中默认调用的patch函数patch_decompress_with_cache()
替换为patch_single_stream()
; 这样替换后,patch内存就是 stepSize+1*(decompress stream memory); (stepSize 是diff时设置的参数) - 还需要注意:2 只是解决了单线程patch的内存的占用问题;而apkpatch的多线程patch时内存优化并不好,会占用非常多的内存,你需要测试。 (而sfpatcher方案才真正解决了这个问题,支持平均O(1)内存的多线程patch。)
from apkdiffpatch.
换成 getSingleCompressedDiffInfo
from apkdiffpatch.
我计划添加该特性,支持单压缩流
(新版本已经添加该特性,需要更新patch端)
from apkdiffpatch.
@sisong 大佬,修改后卡在 getCompressedDiffInfo 了,能辛苦提供个替换算法方案的 demo 吗?
run ZipPatch:
getCompressedDiffInfo(&diffInfo,zipDiffData.hdiffzData) PATCH_HDIFFINFO_ERROR!
from apkdiffpatch.
Related Issues (20)
- ApkNormalized对Apk正则化之后使用7zip解压出现问题 HOT 6
- Can I use it for delta patching custom android ROMS? HOT 2
- 建议andorid release 上传maven HOT 3
- How to create diff and apply patch for android? HOT 21
- Problem with split apks (INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2) HOT 9
- 如何在Android设备上二次签名? HOT 4
- 请问下,重新签名后patch反而变大了。没有重新签名直接生成的patch是400多k,重新签名后生成的反而是1.2M。比google的archive-patcher 的patch包大,与您这边的测试结果好像不符合。使用的是v2签名的Apk HOT 11
- ps: 广告,我正在开发一个不需要重新签名的方案[sfpatcher](https://github.com/sisong/sfpatcher), HOT 3
- Native异常:signal 11 (SIGSEGV) , code 1 (SEGV_MAPERR), fault addr 0xdeadcab1: HOT 7
- ApkPatch.patch return 5 HOT 3
- error patch when signed by new apksigner version?
- optimize muti-thread patch max require memory
- unexpected e_version: 65725 HOT 9
- patch fail with multi-thread HOT 2
- 你使用的那个版本的 ndk 啊? HOT 1
- 测试发现 patch 最大的耗时还是在将 new apk 的数据部分压缩,想要直接生成压缩等级为 0 的 new apk,求问大佬有什么办法嘛 HOT 1
- HDiffPatch 可以断点,但是 ApkDiffPatch 无法断点,请问大佬是 apkdiffpatch 进行了什么特殊设置嘛 HOT 1
- Problem with split apks (INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2) HOT 6
- ZipDiff zip file failed if zip > 4G HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apkdiffpatch.