ResourceBundale and DataPack: Support gzip pak files
This adds support to DataPack to load gzipped .pak.gz files into memory, instead of using mmap to map memory to an uncompressed pak file. The advantage is that .pak files compress by as much as 70% on disk. The disadvantage is that mmapped memory (which is initially resident) can be trivially swapped out when not in use (since it is already backed by a file), whereas allocated memory uses regular swap storage. For Chrome OS this is likely to be a worthwhile tradeoff. Testing shows that fairly minimal use of the Chrome OS UI swaps in most of the file after it is swapped out. See the issue for details. Note: This CL does not implelent compression of .pak files, that will be handled in a follow-up CL. This also removes the unused |test_file_exists| parameter from ResourceBundle::GetLocaleFilePath (it was always set to true). Bug: 1017864 Change-Id: I16eaaf8d294199d8310ec06fedc79dabfb0d27a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1882759 Commit-Queue: Steven Bennetts <stevenjb@chromium.org> Reviewed-by:Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#713124}
Showing
Please register or sign in to comment