200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > 看了个文章 说7z压缩文件损坏后无法恢复。建议使用zip/rar格式

看了个文章 说7z压缩文件损坏后无法恢复。建议使用zip/rar格式

时间:2021-08-27 04:14:12

相关推荐

看了个文章 说7z压缩文件损坏后无法恢复。建议使用zip/rar格式

吾一直使用7zip。后来看文章说,7zip压缩算法,如果文件出现一点错误,很难恢复。这么一说,吾决定以后统一使用zip格式。

在LINUX上,默认的就是zip/tar,都是zip格式。

压缩软件使用winZip?winRAR?待吾看看。

/question/23299326/answer/820275787

关于安全的部分如下:

The [LZMA2 format] contains an unrestricted mix of LZMA packets and uncompressed data packets. Each packet starts with a header that is not protected by any check sequence in spite of containing the type and size of the following data. Therefore, every bit flip in a LZMA2 header causes either a framing error or a desynchronization of the decoder. In any case it is usually not possible to decode the remaining data in the block or even to know what failed. Compare this with [Deflate] which at least does protect the length field of its non-compressed blocks. (Deflate's compressed blocks do not have a length field).

我简单解释一下,LZMA2是7z的默认压缩算法,用这种算法压缩文件会产生这么一种情况:

假如一个普通文件内容是「ABCDEFG」,然後它第二个字节损坏了,我们看到的就是「A?CDEFG」。但如果这是一个使用了LZMA2算法的7z压缩包,我们看到的就是「A??????」。

Therefore, every bit flip in a LZMA2 header causes either a framing error or a desynchronization of the decoder. In any case it is usually not possible to decode the remaining data in the block or even to know what failed.

翻译:因此,在LZMA2报头中的每个位翻转都会引起解码器的帧错误或者同步失调。在所有情况下,通常都不可能解码块中的剩余数据,甚至都不知道哪里错了

最後,这位大佬给出的建议是:不要用LZMA2算法储存重要文件。

也就是说,如果你坚持使用7z格式,那么你就祈祷吧,祈祷压缩包裡一个字节错误都不要有。因为只要出现一个字节错误,整个压缩包就废了。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。