Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
Android.mk | D | 03-May-2024 | 590 | 39 | 24 | |
README.txt | D | 03-May-2024 | 1.4 KiB | 36 | 25 | |
ZipAlign.cpp | D | 03-May-2024 | 7.5 KiB | 270 | 175 | |
ZipEntry.cpp | D | 03-May-2024 | 20.9 KiB | 697 | 453 | |
ZipEntry.h | D | 03-May-2024 | 10.2 KiB | 346 | 178 | |
ZipFile.cpp | D | 03-May-2024 | 36.3 KiB | 1,298 | 794 | |
ZipFile.h | D | 03-May-2024 | 8.5 KiB | 271 | 119 |
README.txt
1zipalign -- zip archive alignment tool 2 3usage: zipalign [-f] [-v] <align> infile.zip outfile.zip 4 zipalign -c [-v] <align> infile.zip 5 6 -c : check alignment only (does not modify file) 7 -f : overwrite existing outfile.zip 8 -v : verbose output 9 <align> is in bytes, e.g. "4" provides 32-bit alignment 10 infile.zip is an existing Zip archive 11 outfile.zip will be created 12 13 14The purpose of zipalign is to ensure that all uncompressed data starts 15with a particular alignment relative to the start of the file. This 16allows those portions to be accessed directly with mmap() even if they 17contain binary data with alignment restrictions. 18 19Some data needs to be word-aligned for easy access, others might benefit 20from being page-aligned. The adjustment is made by altering the size of 21the "extra" field in the zip Local File Header sections. Existing data 22in the "extra" fields may be altered by this process. 23 24Compressed data isn't very useful until it's uncompressed, so there's no 25need to adjust its alignment. 26 27Alterations to the archive, such as renaming or deleting entries, will 28potentially disrupt the alignment of the modified entry and all later 29entries. Files added to an "aligned" archive will not be aligned. 30 31By default, zipalign will not overwrite an existing output file. With the 32"-f" flag, an existing file will be overwritten. 33 34You can use the "-c" flag to test whether a zip archive is properly aligned. 35 36