OSDN Git Service

Add lz4hc image compression format
authorMathieu Chartier <mathieuc@google.com>
Thu, 25 Feb 2016 21:52:10 +0000 (13:52 -0800)
committerMathieu Chartier <mathieuc@google.com>
Thu, 25 Feb 2016 22:55:55 +0000 (14:55 -0800)
commita6e81ed4c185b7362cd5199ebe5507d00883a9b0
tree851f18eeb8b6401793051d5f52dfad1f7e69f965
parenteea36cb923b078b86c7b5033ce75fe1b8ea4e522
Add lz4hc image compression format

Smaller than lz4 and decompresses at the same speed. Compression is
a bit slower.

Example saves on old FB APK:
Uncompressed: 44748800 bytes
LZ4: 12443648 bytes
LZ4HC: 11055104 bytes

Generating the image slows down by ~1s per 20MB of image due to
slower compression. Decompression is about the same speed but there
should be a slight speedup since less data needs to be read from
flash.

Added test.

Bug: 22858531

Change-Id: Ib2704305b9bec5b0ba3b1e871f59f4eedff330b7
compiler/image_test.cc
compiler/image_writer.cc
dex2oat/dex2oat.cc
runtime/gc/space/image_space.cc
runtime/image.h
runtime/oat_file_manager.cc