是否有 Windows 复合文件的开源替代方案?

Is there an open-source alternative to Windows compound files?(是否有 Windows 复合文件的开源替代方案?)

本文介绍了是否有 Windows 复合文件的开源替代方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将几个文件保存到一个容器文件中.这些文件可以稍后修改,这意味着容器可能必须扩大.用户应该只将此容器视为文件系统中的单个文件.该应用程序是用 C++ 编写并在 Windows 上运行,但文件也应该可以移植到其他平台.

I'm trying to save a couple of files to a container file. The files can be modified later which means the container might have to be enlarged. The user should only see this container as a single file in the file system. The application is written in C++ and running on Windows, but the files should be portable to other platforms as well.

对容器格式的要求是:
1. 大小:允许大于 4GB 的文件.
2. 可移植性:在其他平台上打开容器文件应该是可行的.
3. 性能:当改变容器内的文件时,只有代表该特定文件的块"可以改变.特别是,可能不会完全重写该文件.
4. 结构:它应该提供一个目录结构,允许构建文件和目录的层次结构.

The requirements for the container format are:
1. Size: Allow files bigger than 4GB.
2. Portability: It should be feasible to open the container files on other platforms.
3. Performance: When changing a file inside the container, only the "chunks" that represent that specific file may be changed. Especially, there may not be a complete rewrite of that file.
4. Structure: It should provide a directory structure that allows to build a hierarchy of files and directories.

如果省略要求 1.) 和 2.) 复合文件(如 Word 和 Excel 使用的),则非常适合.

When leaving out requirement 1.) and 2.) compound files (like used by Word and Excel) are a good fit.

当然,可以设计一个满足所有要求的 API,但我想知道是否已经有一些开源解决方案可以解决这个问题?

Of course, it's possible to design an API that fulfills all the requirements, but I wonder if there is already some open-source solution that tackles the very problem?

有什么建议吗?

推荐答案

如果您使用 C++ 构建应用程序,您正在寻找的 HDF5 文件格式是什么

Is the HDF5 File Format what you are looking for if you are building an application in C++

这篇关于是否有 Windows 复合文件的开源替代方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:是否有 Windows 复合文件的开源替代方案?

基础教程推荐