我最近压缩了一些文件,我注意到base64编码的数据似乎压缩得非常糟糕.这是一个例子:
xz -9:13,2 MiB / 429,7 MiB = 0,031 4,9 MiB/s 1:28base64它并压缩通过xz -9:26,7 MiB / 580,4 MiB = 0,046 2,6 MiB/s 3:47base64原始压缩的xz文件:17,8 MiB几乎没有时间=预期1.33x的大小增加所以可以观察到的是:
怎么会这样?Base64是一种无损,可逆的算法,为什么它会如此影响压缩呢?(我也试过gzip,结果相似).
我知道base64然后压缩文件是没有意义的,但大多数时候一个人无法控制输入文件,我会想到,因为实际的信息密度(或任何它被称为base64编码文件的几乎与非编码版本相同,因此可以类似地压缩.
我跑了git rebase -i <target hash>。进行更改后,我跑了git rebase --continue。Git 然后正确地重新调整了 15 次提交中的 15 次。成功执行此操作后,我收到此错误:
error: could not apply <bad hash>... <commit message>
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Could not apply <bad hash>... <commit message>
Run Code Online (Sandbox Code Playgroud)
我检查了与提交相关的内容bad hash。我发现这个提交发生在大约 3 个月之前target hash。那么为什么 git rebase 甚至会触及这个提交呢?我认为 rebase 只针对从当前提交到 …