Как это возможно, что WinRAR может восстановить любой том одним файлом .rev?

19251
Coldblackice

Я только что узнал о .revфайлах с WinRAR - где, если у вас есть 10 частей объема с RAR, например, плюс один .rev(восстановление) объема - .revобъем будет иметь возможность «исправить» любой один испорченный .rarобъем.

Как это возможно? Я не понимаю, как на одном томе могут быть все данные для исправления любого / всех отдельно разбитых томов.

Я предполагаю, что, возможно, возможно вместо томов, которые не будут разбиты «линейно», как я себе представляю, где каждый том RAR содержит отдельные, отдельные файлы целого, упакованного внутри; скорее, возможно, .revвосстановление возможно, когда тома RAR рассматриваются как один непрерывный файл битов и байтов, так сказать, и что, возможно, существует какое-то колдовство CRC (ага, «ремонтные работы»), используемые для исправления поврежденных байтов.

Но я просто не понимаю, как вы можете иметь 9 рабочих томов с 1 поврежденным, но иметь том для восстановления, который может восстановить любой из этих томов. Как один том может хранить данные «всех» томов?

30
Коды коррекции стирания. Сравните с http://en.wikipedia.org/wiki/Parchive Dan D. 11 лет назад 3

2 ответа на вопрос

53
Paul

Lets take a really simple case.

You have four volumes and a recovery volume, each with 1 bit of information in it:

 ======================================================== Volumes: = Volume 1 = Volume 2 = Volume 3 = Volume 4 = Recovery = =----------=----------=----------=----------=----------= Bits: = 1 = 0 = 1 = 1 = 1 = ======================================================== 

The recovery volume would contain the result of each of these bits XORd together:

1 XOR 0 XOR 1 XOR 1 = 1 

So, our recovery volume contains the single bit 1.


Now, lets say volume 1 fails.

If we XOR the remaining volumes 2, 3 and 4 with the recovery bit in place of the failed volume we get:

1 XOR 0 XOR 1 XOR 1 = 1 ^ 

So, this tells us that volume 1 contained 1, since it is the result of the equation.

Let us pretend volume 2 died instead, so we replace it's value in the equation with the recovery bit:

1 XOR 1 XOR 1 XOR 1 = 0 ^ 

So we know that volume 2 contained 0, since it is the result of the equation.

If volume 3 or 4 failed, they would both produce 1 in this equation.


So, if any of the volumes failed, the recovery volume can be used to reconstruct the data based on the remaining volumes. This is probably the simplest form of error correction you can have. If two volumes failed, you can't recover anything.

Чтобы было ясно, есть схемы, которые позволяют восстанавливаться после нескольких сбоев тома. Dietrich Epp 11 лет назад 4
Это работает, только если вы знаете, какое устройство вышло из строя, не так ли? heinrich5991 11 лет назад 0
@ heinrich5991 вы знаете по внутреннему CRC объема ratchet freak 11 лет назад 1
21
David Schwartz

For a really simple way to understand how this could be, imagine if the recovery volume contained the sum of the other volumes. With a list of numbers, missing one of them, and their sum, you can always reconstruct the missing number.

For example, consider these two digit numbers, 13, 88, 17, 43. If you knew that there was one missing number and the last two digits of the sum of all the numbers was 81, you could find the missing number. 13 + 88 + 17 + 43 = 161. The only two-digit number you can add to that to make a number that ends in 81 is 20.

Say you had the 20 and were missing the 43. 13 + 88 + 17 + 20 = 138. The only two-digit number you can add to that to make a number that ends in 81 is 43.

Thus the recovery number lets you find any one missing number.

Просто и хорошо поставлено - спасибо! Coldblackice 10 лет назад 0

Похожие вопросы