• Doug Zongker's avatar
    better patching for zip files · 6b2bb3d9
    Doug Zongker authored
    Adds a zip mode ("-z") to imgdiff to construct efficient patches for
    zip files (including jars and apks).  We identify the regions within
    the zip file containing deflated data, and when a corresponding file
    can be found in the source zip, a patch is generated for the
    uncompressed version of the data.
    
    The GZIP chunk type is replaced with a DEFLATE chunk type that handles
    a raw deflated data stream.  This new DEFLATE chunk can be used for
    both gzipped pieces (as found within boot and recovery images) and zip
    files (apks, etc.)  The gzip header and footer are handled by NORMAL
    chunks on either side of the main DEFLATE chunks.  (Typically these
    tiny NORMAL chunks will get merged with adjacent chunks, so the number
    of output chunks is unaffected.)
    
    Add a test script that tests the generate-apply cycle on all the zips
    and images within a pair of full OTA packages.
    6b2bb3d9
imgdiff.h 1.11 KB