platform_bootable_recovery/applypatch
Tianjie Xu cc61cf6a9f Convert deflate image chunks to raw if the raw data is smaller
The imgpatch will fail on empty deflates because the bspatch won't call
the sink function if the target length is zero.

Instead of compressing an empty string, it's cleaner to not generate such
empty deflate chunks in the patch. Therefore, we can just convert the
chunk type to raw if the target length is smaller than the patch data.

Also adjust some unit tests and add the testdata gzipped_source &
gzipped_target. These two files are ~1K each and are generated by
gzipping two slightly different regular files.

Bug: 79265132
Test: unit tests pass, imgpatch applys successfully on the given src/tgt
Change-Id: I6bfff3251918137f6762a6f9e9551642371a1124
2018-05-24 10:49:54 -07:00
..
include/applypatch Convert deflate image chunks to raw if the raw data is smaller 2018-05-24 10:49:54 -07:00
Android.bp Disable building libapplypatch on mac 2018-02-17 22:06:31 -08:00
applypatch.cpp Save the target file when applypatch tests fail 2018-04-26 19:46:39 -07:00
applypatch_main.cpp applypatch: Add testcases for applypatch executable. 2016-11-01 14:40:14 -07:00
applypatch_modes.cpp applypatch: Remove the obsolete support for "applypatch -s". 2017-04-25 21:23:12 -07:00
applypatch_modes.h applypatch: Add testcases for applypatch executable. 2016-11-01 14:40:14 -07:00
bspatch.cpp applypatch: Drop the SHA_CTX parameter in Apply{BSDiff,Image}Patch. 2018-04-20 09:27:50 -07:00
freecache.cpp Rename CacheLocation to Paths. 2018-04-25 21:46:00 -07:00
imgdiff.cpp Convert deflate image chunks to raw if the raw data is smaller 2018-05-24 10:49:54 -07:00
imgdiff_main.cpp Add tests for imgdiff. 2016-12-19 16:53:03 -08:00
imgpatch.cpp Convert deflate image chunks to raw if the raw data is smaller 2018-05-24 10:49:54 -07:00
NOTICE Add NOTICE file 2012-04-06 13:51:00 -07:00