[haiku-development] Re: hpkgs and compression

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 24 Mar 2014 11:44:14 +0100

On 03/22/2014 08:50 PM, Jonathan Schleifer wrote:
Am 22.03.2014 um 19:54 schrieb David Given <dg@xxxxxxxxxxx>:

Android packages are signed zipfiles, and have much the same access
patterns as hpkgs; there's a special tool called zipalign which ensures
that the files in the zipfile are 4-aligned. This allows Android to
mmap() the zipfiles and access file data using 32-bit instructions. i.e
they are *not* aligning the files to block boundaries, presumably
because they think it's not worth it.

Android is a different story: They only run on devices with an SSD.

But aligning it for mmap() is a good point - though we should use 8 instead of 
4 I guess, since some platforms have 8 bytes as their natural alignment.

mmap()ed data are always page aligned. And this really isn't relevant in this case, because the alignment within the package file is completely irrelevant to mmap()ing contained files.

CU, Ingo


Other related posts: