archive-patcher | Automatically exported from | Compression library
kandi X-RAY | archive-patcher Summary
kandi X-RAY | archive-patcher Summary
Archive-patcher is an open-source project that allows space-efficient patching of zip archives. Many common distribution formats (such as jar and apk) are valid zip archives; archive-patcher works with all of them. Because the patching process examines each individual file within the input archives, we refer to the process as File-by-File patching and an individual patch generated by that process as a File-by-File patch. Archive-patcher processes almost all zip files, but it is most efficient for zip files created with "standard" tools like PKWARE's 'zip', Oracle's 'jar', and Google's 'aapt'. By design, File-by-File patches are uncompressed. This allows freedom in choosing the best compression algorithms for a given use case. It is usually best to compress the patches for storage or transport. Note: Archive-patcher does not currently handle 'zip64' archives (archives supporting more than 65,535 files or containing files larger than 4GB in size).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Compute the next match
- Searches for a match
- Searches for a sequence of bytes
- Returns the length of the alignment between the two specified arrays
- Apply a patch to a file
- Copy bytes from original file into the output file
- Copies data from a patch file into an output stream
- Compares this descriptor to another
- Compares this range with the specified value
- Apply a delta between old and new blob
- Compares this object for equality
- Reads a 64 - bit integer from the specified input stream
- Skips the specified number of bytes
- Returns an unmodifiable map of levels to be used by the strategies
- Generate a pre - diff plan
- Creates a hashCode of the data
- Creates a hashCode of this range
- Returns a hashCode of the entry
- Generates a compressed corpus
- Compress a file
- Returns the recommendations based on the original recommendations
- Compress the patch file
- Returns the recommendations based on the uncompressed recommendation
- Checks if the recommendings are equal
- Generate baseline
- Ensures that the list is sorted
archive-patcher Key Features
archive-patcher Examples and Code Snippets
Community Discussions
Trending Discussions on archive-patcher
QUESTION
I recently read about that Google is using File-by-File Patching and another one algorithm BsDiff - Delta update which patches apk files and gives only update sized apk to download from Play Store.
I went through below blogs and links:
2) https://github.com/andrewhayden/archive-patcher/blob/master/README.md for "File-by-File Patching"
3) https://android-developers.googleblog.com/2016/07/improvements-for-smaller-app-downloads.html for "BsDiff" patching
I installed BsDiff on my Linux and applied it on old and new apk but it remains the same size of the app and also while I update it on Play Store, it shows full size as at the time of install.
Also, I downloaded "File-by-File Patching" code and made apk through it and updated it on Play Store but the same, no reduced size of apk.
So, If anybody who has done this or know about this, Please give your answer so I can make my app update of reduced size app update on Play Store.
...ANSWER
Answered 2018-Mar-29 at 14:42There are four different sizes for one APK which are classified as:
- Raw Apk Size
- Download Size
- Install Size
- Update Size
You are mostly focusing on Raw Apk size which won't have much difference. Its the google play store which uses different algorithms to compress the APK. This in turn ensure that Download Size of the apk is lower so that the mobile data consumption is reduced for end user.
Once the compressed APK is downloaded it will be uncompressed on the user's device and you will get Install Size. This size can vary from raw size since it will involve some JIT and/or AOT done on it.
When it comes to Update size, you upload the Apk to play store with your update, google play store in turn will compute the delta and deliver it to end user. This delta will then be merged on device. This optimization reduces the update size hence whole APK won't be downloaded again and user will save cost.
To summarize, you might not see big impact on Raw Size of your apk but the optimizations on play store will ensure that Download Size and Upload Size is optimal.
For more details techniques to be applied, you can refer to this article. It gives anatomy of apk sizes as I have described and provides great tips to reduce the sizes.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install archive-patcher
You can use archive-patcher like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the archive-patcher component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page