What is the block size of the iphone filesystem?

后端 未结 1 1742
囚心锁ツ
囚心锁ツ 2020-12-28 09:41

Is it worth it for me to compress a 1000 byte file to a 300 byte file? or will the filesystem space consumption be the same?

I\'m looking at storing 10k less than 4k

1条回答
  •  春和景丽
    2020-12-28 10:28

    The iPhone uses an HFSX filesystem, with an 8k block size on the user partition:

    int main(int argc, char *argv[]) {
      struct statfs *mntbufp = NULL;
      getmntinfo(&mntbufp, 0);
    
      unsigned i, count = 0;
    
      count = getmntinfo(&mntbufp, 0);
      for (i=0; i

    returns

    Volume / blocksize: 8192
    Volume /dev blocksize: 512
    Volume /private/var blocksize: 8192
    Volume /Developer blocksize: 4096
    

    0 讨论(0)
提交回复
热议问题