delphi - 制作没有基础(源)文件的增量文件?

标签 delphi diff rsync delta

(好吧,别对我大喊大叫,这里已经很晚了:))

我正在研究 delta diff 工具(命令行工具或组件,只要我可以从 Delphi 2010 调用它们就可以了)

我有这个项目,我将文件上传到服务器,我需要优化上传,所以如果我只能上传 delta 文件而不是发送新文件,然后比较服务器上的新旧文件版本,那就太好了。

我读到了 Duplicity here

Duplicity is a variation on rdiff-backup that allows for backups without cooperation from the storage server, as with simple storage services like Amazon S3. It works by generating the hashes for each block in advance, encrypting them, and storing them on the server, then retrieving them when doing an incremental backup. The rest of the data is also stored encrypted for security purposes.



这让我开始思考,是否有一种工具(或方法)可以基于 生成补丁或增量文件(我不确定正确的术语是什么)新 文件,没有 可以访问原始文件吗?

我的意思是说我有这个文件,我修改过一次:
my-data.db
[ my-data.db ] modified       --> [ delta-file-1.diff ]

有没有办法根据新文件构造[delta-file-1.diff]没有 可以访问旧文件? (可能是通过为原始文件存储某种签名?)

我研究了很多这个主题(rdiff、PatchAPI、ZDelta、XDelta、MSDelta 等),但我找不到任何关于这个的实际工作示例。

这些引用资料谈到了这一点,但我想听听是否有人可以指导我和/或建议更好的工具来回答我上面提出的问题。

Compressing a Target Without a Source File

Windows Patch API: Compressing a Target Without a Basis (Source) File

提前致谢!

最佳答案

不,如果没有获得 A 和 B 的方法,您就无法获得与 A 和 B 的区别。

您可以从旧版本的 A 重构 A 并应用差异。

A的签名不会削减它。

关于delphi - 制作没有基础(源)文件的增量文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9441801/

相关文章:

delphi - Firemonkey 中的 Canvas.Pixels[X,Y] 相当于什么?

delphi - 在 TGridPanel 中单击单元格

shell - 等效更改的差异结果不一致

linux - rsync 在 Hudson 中失败

iphone - 是否可以在 iOS 应用程序中使用 rsync?

delphi - 将 TIDCookieManager 中的 Cookie 保存到文件中

swift - 什么是 "with ... do"swift 等价物

两个项目版本中的 SVN 差异

python - 如何使用任意匹配函数来区分/对齐 Python 列表?

backup - Rsync - 将符号链接(symbolic link)复制为目录,但如果它们指向文件则跳过