为 Linux 分发内容,就像在 Android 和 Android 中一样。 iOS?
我目前正在设计一个基于Linux 的系统。该系统的用户将被允许从互联网下载内容,即程序。内容将在具有特殊扩展名的 zip 包中分发,例如使用 .cpk 而不是 .zip,并且采用零压缩。
我想为用户提供与 iOS 和 Android 相同的体验,其中内容分布在包含的包中并从那里运行。
我的问题是,我可以让我的 Linux 系统在不解压包的情况下运行包内的程序吗?如果没有,那么还有另一种方法可以实现我在 Linux 中所追求的目标吗?
请注意,我不想将内容提取到临时文件夹中并在执行后删除它们,因为这可能需要很长时间,特别是对于大内容。这也将使运行内容的存储空间需求增加一倍。
先感谢您。
I'm currently designing a Linux-based system. Users of the system will be allowed to download contents, i.e. programs, from the Internet. The contents will be distributed in zip packages given special extension names, e.g. .cpk instead of .zip, and with zero compression.
I want to give users the same experience found in iOS and Android, in which contents are distributed in contained packages and run from there.
My question is that can I make my Linux system to run programs from inside the packages without unzipping them? If not, then is there another approach to what I'm after in Linux?
Please note that I don't want to extract contents into a temp folder and delete them after execution because that might take longtime, specially for large contents. That will also double the storage space requirements for running the contents.
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
klik(至少在klik2 CMG 格式) 使用了 zISO 映像,可以由内核或 FUSE 客户端安装,而不是 zip。您可以使用内核或通过 FUSE 支持的其他文件系统类型。也许fuse-zip值得一试?
您还可以修改加载器以直接从包中读取。例如,Android 的 Dalvik VM 可以直接从 apk 捆绑包(实际上是 zip 文件)加载 dex 文件。 (然而,Android 上的本机代码仍然需要先解压,并且确实需要更多的时间和空间。修改本机加载程序......很棘手。)
klik (at least in the klik2 CMG format) used an zISO image, which can be mounted by the kernel or by a FUSE client, rather than a zip. You could use other filesystem types that are supported by the kernel or via FUSE. Maybe fuse-zip is worth a shot?
You could also modify the loader to read directly out of the bundle. For example, Android's Dalvik VM can load dex files directly from apk bundles, which are effectively zip files. (Native code on Android, however, still needs to be unpacked first, and does take more time and space. Modifying the native loader is… tricky.)