Giter VIP home page Giter VIP logo

Comments (19)

Archive-Patcher-Sync-Robot avatar Archive-Patcher-Sync-Robot commented on May 19, 2024

could you share some details on how you run the demo?

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

could you share some details on how you run the demo?

I have established a application module, then copy the code in the SamplePatchApplier class into MainActivity, after launch it show "Inflater has been closed".

from archive-patcher.

Archive-Patcher-Sync-Robot avatar Archive-Patcher-Sync-Robot commented on May 19, 2024

Hi, multiple things could have gone wrong here.

One thing to try is to remove the part of the code that compresses the patch and decompress it. (e.g., generate the patch using just FileByFileDeltaGenerator without DeflaterOutputStream, apply the patch using FileByFileDeltaApplier). If that works, we know the problem is within the compression bit. If that doesn't, then something is probably wrong within the patching part.

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

Thank you for you reply. I have remove the DeflaterOutputStream, it still have the same NPE. It is DefaultDeflateCompressionDiviner's method--divineDeflateParameters go wrong. And i directly use BsDiffDeltaGenerator to generate the delta, the output file is aways about 20B.

from archive-patcher.

pspencil avatar pspencil commented on May 19, 2024

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024
  1. NPE occur in the generator, i do not have test applier.
  2. I test the generator with wexin, qq. And what's your email address, it's my honor to send old and new archive to you.

from archive-patcher.

Archive-Patcher-Sync-Robot avatar Archive-Patcher-Sync-Robot commented on May 19, 2024

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

Old version and new version apk is posted to your email, MainActivity is also in the zip.

Thank you for your patience!

from archive-patcher.

pspencil avatar pspencil commented on May 19, 2024

Found the cause. It is due to different implementation of InflaterInputStream in android JDK.

In Android, close() ends the inflater all the time. https://chromium.googlesource.com/android_tools/+/refs/heads/master/sdk/sources/android-25/java/util/zip/InflaterInputStream.java#229

In non-Android it only closes if it is created within the InflaterInputStream. https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/java/util/zip/InflaterInputStream.java#L226

Since we reuse the Inflater here and closes the InflaterInputStream here, it behaves differently on Android.

I will have to think about how to fix this.

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

Ok, thx!

from archive-patcher.

pspencil avatar pspencil commented on May 19, 2024

Should be fixed by the commit.

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

It still cannot word well in the demo i post you

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

BsDiffDeltaGenerator can not generate delta well, the delta size is always 20B.

from archive-patcher.

pspencil avatar pspencil commented on May 19, 2024
  1. note that the commit is in the v2 branch only.
  2. I will look into the bsdiff thing.

from archive-patcher.

pspencil avatar pspencil commented on May 19, 2024

For the BSDIFF thing, it seems that the task never finish. Probably it times out? Since you are generating patches on Android, it could be very slow.

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

ok, thx

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

hi, what's the difference between the master and v2, v2 is stable? Thank you very mach!

from archive-patcher.

pspencil avatar pspencil commented on May 19, 2024

Technically speaking, master is stable. I am adding new features to v2. One of them is diffing embedded archives inside archives.

from archive-patcher.

commutescript avatar commutescript commented on May 19, 2024

ok,thank you for your patient!

from archive-patcher.

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.