Comments (19)
could you share some details on how you run the demo?
from archive-patcher.
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.
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.
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.
from archive-patcher.
- NPE occur in the generator, i do not have test applier.
- 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.
from archive-patcher.
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.
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.
Ok, thx!
from archive-patcher.
Should be fixed by the commit.
from archive-patcher.
It still cannot word well in the demo i post you
from archive-patcher.
BsDiffDeltaGenerator can not generate delta well, the delta size is always 20B.
from archive-patcher.
- note that the commit is in the v2 branch only.
- I will look into the bsdiff thing.
from archive-patcher.
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.
ok, thx
from archive-patcher.
hi, what's the difference between the master and v2, v2 is stable? Thank you very mach!
from archive-patcher.
Technically speaking, master is stable. I am adding new features to v2. One of them is diffing embedded archives inside archives.
from archive-patcher.
ok,thank you for your patient!
from archive-patcher.
Related Issues (20)
- Compile instructions for bsdiff_jni.cc HOT 8
- Massive performance regression in v2 non-native generator HOT 3
- Truth incompatible with android HOT 4
- Support For iOS HOT 2
- Input too large HOT 2
- Update README to explain that bsdiff is used without compression
- java.lang.NullPointerException: Inflater has been closed HOT 3
- Is this lib production ready or deprecated? HOT 9
- How to run the sample code? HOT 4
- Very slow to apply patch on Android device HOT 3
- Failed to generate patch from APK: java.util.zip.ZipException: EOCD record not found in last 32k of archive, giving up HOT 4
- Android: java.lang.IllegalStateException: setLevel cannot be called after setInput HOT 3
- How to build code on branch v2 HOT 1
- Please open a security advisory HOT 8
- Android 11 (R) [API 30] : Zlib not compatible on this system HOT 3
- Some zlib versions fail the DefaultDeflateCompatibilityWindow compatability test HOT 2
- Android12 aplier File failed HOT 3
- On Android 12 devices, The file generated with the patch was different from the origin file; HOT 16
- Security Policy violation Binary Artifacts HOT 23
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 archive-patcher.