推荐一种可以通过 Java 中的随机访问进行更新的索引文件格式

发布于 2024-09-17 07:02:52 字数 337 浏览 4 评论 0原文

我需要一种可以容纳数百个大型可变大小二进制 blob 的索引文件格式。

Blob 大约为 1-5MB,文件可能大至 1 GB。我需要能够快速查找、读取、添加和删除 blob,而无需重新创建整个文件。我不需要压缩斑点,但是如果斑点被删除,我想回收或重用该空间。

理想情况下会有一个 Java API。

我目前正在使用 ZIP 格式执行此操作,但没有已知的方法可以在不重新创建 ZIP 文件的情况下更新它,并且性能很差。

我研究过 SQLite,但它的 blob 性能很慢,而且它对我的需求来说太过分了。

有什么想法,还是我应该自己推出? 如果我自己推出,有什么书籍或网页建议吗?

I need an indexed file format that can hold a few hundred large variable sized binary blobs.

Blobs are around 1-5MB and the file could be as large as 1 GB. I need to be able to quickly find, read, add and remove blobs without recreating the the entire file. I have no need to compress the blobs, however if blobs were removed, I'd like to reclaim or reuse the space.

Ideally there would be a Java API.

I'm currently doing this with a ZIP format, but there's no known way to update a ZIP file without recreating it and performance is bad.

I've looked into SQLite but its blob performance was slow, and its overkill for my needs.

Any thoughts, or should I roll my own?
And if I do roll my own, any book or web page suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

格子衫的從容 2024-09-24 07:02:52

Berkeley DB Java 版 可以满足您的需求。它是免费的。

Berkeley DB Java Edition does what you need. It's free.

清旖 2024-09-24 07:02:52

您需要一些虚拟文件系统。我们的 SolFS 是选项之一,但我们只有 JNI 层,因为引擎是用C. 还有一个选项,CodeBase,但由于他们不提供文件系统的评估版本,我对它了解一些。

SolFS 非常适合您的任务,因为它允许您拥有文件的替代流,并将可搜索元数据与每个文件甚至替代流相关联。

You need some virtual file system. Our SolFS is the one of the options yet we have only JNI layer, as the engine is written in C. There exists one more option, CodeBase, but as they don't provide an evaluation version of their file system, I know a few about it.

SolFS is ideally suitable for your task, because it lets you have alternative streams for files and associate searchable metadata with each file or even alternative stream.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文