Giter Club home page Giter Club logo

Comments (4)

sisong avatar sisong commented on June 12, 2024 2
  1. 最简单的方案:diff的时候控制一下压缩字典大小; 比如单个4MB或8MB; 一般手机上应该都没有问题了。
  2. 麻烦一点的方案:替换使用的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时设置的参数)
  3. 还需要注意:2 只是解决了单线程patch的内存的占用问题;而apkpatch的多线程patch时内存优化并不好,会占用非常多的内存,你需要测试。 (而sfpatcher方案才真正解决了这个问题,支持平均O(1)内存的多线程patch。)

from apkdiffpatch.

sisong avatar sisong commented on June 12, 2024 1

换成 getSingleCompressedDiffInfo

from apkdiffpatch.

sisong avatar sisong commented on June 12, 2024 1

我计划添加该特性,支持单压缩流

(新版本已经添加该特性,需要更新patch端)

from apkdiffpatch.

ityancs avatar ityancs commented on June 12, 2024

@sisong 大佬,修改后卡在 getCompressedDiffInfo 了,能辛苦提供个替换算法方案的 demo 吗?

run ZipPatch:
getCompressedDiffInfo(&diffInfo,zipDiffData.hdiffzData) PATCH_HDIFFINFO_ERROR!

from apkdiffpatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.