OSDN Git Service

verity: add C++ version of build_verity_tree that handles sparse files
authorColin Cross <ccross@android.com>
Thu, 17 Apr 2014 21:09:23 +0000 (14:09 -0700)
committerColin Cross <ccross@android.com>
Tue, 29 Apr 2014 00:19:31 +0000 (17:19 -0700)
commit724396ed8dbf71ce2744e916fec2e6aec05d1041
treed77476d19a5adc3fe851a6fcfa3f468847899ccb
parentf9fd34fe774ba07fab9d45ce75d930f7b19520e4
verity: add C++ version of build_verity_tree that handles sparse files

A C++ version can reuse libsparse to calculate the verity hash tree
of a sparse file without unsparsing it.  In addition to saving disk
space, it also cuts the time taken in half by optimizing out the
hash calculation for skipped blocks that are known to be zero.

Change-Id: I882fe3a417dc2c83bb0e6cd974b6a886f8bc8ac3
verity/Android.mk
verity/build_verity_tree.cpp [new file with mode: 0644]