bsdiff | applying patches to binary files | Build Tool library
kandi X-RAY | bsdiff Summary
kandi X-RAY | bsdiff Summary
There are two separate libraries in the project, bsdiff and bspatch. Each are self contained in bsdiff.c and bspatch.c The easiest way to integrate is to simply copy the c file to your source folder and build it. The overarching goal was to modify the original bsdiff/bspatch code from Colin and eliminate external dependencies and provide a simple interface to the core functionality. I’ve exposed relevant functions via the _stream classes. The only external dependency not exposed is memcmp in bsdiff.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of bsdiff
bsdiff Key Features
bsdiff Examples and Code Snippets
Community Discussions
Trending Discussions on bsdiff
QUESTION
I am trying to reduce data transfer to my embedded linux device by creating patches for almost similar binaries. I have memory constraints on my device and hence heavy algorithms like bsdiff and bspatch are unaffordable on my target for binary sizes of around 36-60mb. I would like to know the commands that have the best algorithms for diffing and patching files that can work with minimalistic amount of memory. I am attaching output of df and free as well here.
...ANSWER
Answered 2021-Jan-04 at 15:46Turns out that rdiff uses a slightly better algorithm in terms of memory but creates a bigger patch(delta) file than either of bsdiff or xdelta3. xdelta3 creates the smallest patchfile but uses more memory to create patch than rdiff does. So in terms of created patch size we have -- xdelta3 < bsdiff < rdiff .
And in terms of memory consumption while applying patch we have -- rdiff < xdelta3 < bsdiff
Hope it helps people optimizing network data transfer!!!
QUESTION
I have to compare using Spark-based big data analysis data sets (text files) that are very similar (>98%) but with very large sizes. After doing some research, I found that most efficient way could be to use delta encoders. With this I can have a reference text and store others as delta increments. However, I use Scala that does not have support for delta encoders, and I am not at all conversant with Java. But as Scala is interoperable with Java, I know that it is possible to get Java lib work in Scala.
I found the promising implementations to be xdelta, vcdiff-java and bsdiff. With a bit more searching, I found the most interesting library, dez. The link also gives benchmarks in which it seems to perform very well, and code is free to use and looks lightweight.
At this point, I am stuck with using this library in Scala (via sbt). I would appreciate any suggestions or references to navigate this barrier, either specific to this issue (delata encoders), library or in working with Java API in general within Scala. Specifically, my questions are:
Is there a Scala library for delta encoders that I can directly use? (If not)
Is it possible that I place the class files/notzed.dez.jar in the project and let sbt provide the APIs in the Scala code?
I am kind of stuck in this quagmire and any way out would be greatly appreciated.
...ANSWER
Answered 2020-Oct-24 at 10:14There are several details to take into account. There is no problem in using directly the Java libraries in Scala, either using as dependencies in sbt or using as unmanaged dependencies https://www.scala-sbt.org/1.x/docs/Library-Dependencies.html: "Dependencies in lib go on all the classpaths (for compile, test, run, and console)". You can create a fat jar with your code and dependencies with https://github.com/sbt/sbt-native-packager and distributed it with Spark Submit.
The point here is to use these frameworks in Spark. To take advantage of Spark you would need split your files in blocks to distribute the algorithm across the cluster for one file. Or if your files are compressed and you have each of them in one hdfs partition you would need to adjust the size of the hdfs blocks, etc ...
You can use the C modules and include them in your project and call them via JNI as frameworks like deep learning frameworks use the native linear algebra functions, etc. So, in essence, there are a lot to discuss about how to implement these delta algorithms in Spark.
QUESTION
I would like to use bsdiff into c++ project by external links.
So I have to build a static link. I can do that with ar rcs bsdiff.a bsdiff.o
But there is already a main function. So When I link bsdiff.a to my cpp build and build it, I have redefinition of main function
.
So how avoid the main function ?
(I already try to comment bsdiff_CFLAGS = -DBSDIFF_EXECUTABLE
into Makefile.am
but get undefined reference to main function
)
ANSWER
Answered 2020-Jan-24 at 12:38The build system provided with the project is quite simple and does not support building the code as a library. As per documentation:
The easiest way to integrate is to simply copy the c file to your source folder and build it.
I would not call project's build system, but rather compile required files directly as part of your project, as developer suggests.
QUESTION
I am looking for an executable (or a library that I might embed in C# or via Managed C++ into the C# project) to create binary diff files for two folders and their contents and a patch tool to apply those patch files as well targeting Windows.
This SO post refers to various tools such as bsdiff/bspatch which is highly dated. The 3rd party executable that is available here does not work when trying it out though. Another variant that is not compatible with the original is the following. Unfortunately it relies on bzlib and certain Linux headers and I wasn't really able to set it up accordingly under Visual Studio.
Anyways, all tools and posts are about 8-10 years old and I'd like to know which tools and libraries are currently maintained that I might take a look at.
...ANSWER
Answered 2018-Jun-01 at 13:08I have been experimenting with Octodiff and I am impressed and will most likely be using it in production.
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 bsdiff
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