iphone文件系统的块大小是多少? [英] What is the block size of the iphone filesystem?

查看:147
本文介绍了iphone文件系统的块大小是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将1000字节文件压缩为300字节文件是否值得?或者文件系统空间消耗是否相同?

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?

我正在寻找在我的iphone上存储少于4k文件的10k,我很好奇我是否会看到空间通过压缩来节省。

I'm looking at storing 10k less than 4k files on my iphone and I'm curious if I'll see space saving by compressing them.

谢谢,

Carl

推荐答案

iPhone使用HFSX文件系统,用户分区上的块大小为8k:

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<count; i++)
  {
    char *volName = mntbufp[i].f_mntonname;
    printf("Volume %s blocksize: %lu\n", volName, mntbufp[i].f_bsize);
  }

  return 0;
}

返回


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


这篇关于iphone文件系统的块大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆