delete incorrect example
This commit is contained in:
@@ -169,41 +169,6 @@ The encoding alphabet is `0-9,a-z,A-Z`, but the `Z` character encodes 61, 62, an
|
||||
|
||||
Note that this encoding cannot produce a `ZZ` sequence, because the `Z` character requires the two high bits to be set to `11`.
|
||||
|
||||
!!! Example is incorrect.
|
||||
|
||||
Transformation example:
|
||||
|
||||
```
|
||||
Mshift = 5
|
||||
bits = 1 01111 00 1 00010
|
||||
```
|
||||
|
||||
Or, equivalently:
|
||||
|
||||
```
|
||||
bits = 101111 001000 10
|
||||
```
|
||||
|
||||
Bits are read least-significant bit first. For the first six bits:
|
||||
|
||||
```
|
||||
101111 = 1*1 + 0*2 + 1*4 + 1*8 + 1*16 + 1*32 = 61 = Z
|
||||
```
|
||||
|
||||
Two bits, `00`, are then inserted into the sequence immediately after the bits encoding Z.
|
||||
|
||||
```
|
||||
bits = 101111 000010 0010
|
||||
000010 = 16 = g
|
||||
0010(00) = 4 = 4
|
||||
```
|
||||
|
||||
The resulting `base62` string is:
|
||||
|
||||
```
|
||||
10111100100010 = Zg4
|
||||
```
|
||||
|
||||
## Comparing set-strings
|
||||
|
||||
When set-strings are compared, the transformation process is reversed until the hash values are obtained:
|
||||
|
||||
@@ -169,41 +169,6 @@ bits = 00 1 00101010
|
||||
|
||||
Заметим, что данным образом невозможно получить последовательность `ZZ`, т.к. символ `Z` требует двух старших бит, выставленных в `11`
|
||||
|
||||
!!! Пример некорректный, кодирование с младшего идёт, Z закидывает в старшие
|
||||
|
||||
Пример преобразования:
|
||||
|
||||
```
|
||||
Mshift = 5
|
||||
bits = 1 01111 00 1 00010
|
||||
```
|
||||
|
||||
Или же
|
||||
|
||||
```
|
||||
bits = 101111 001000 10
|
||||
```
|
||||
|
||||
Биты читаются младшим битом вперёд. Первые 6 бит:
|
||||
|
||||
```
|
||||
101111 = 1*1 + 0*2 + 1*4 + 1*8 + 1*16 + 1*32 = 61 = Z
|
||||
```
|
||||
|
||||
Тогда в последовательность добавляется два бита `00` сразу после битов, кодирующих Z.
|
||||
|
||||
```
|
||||
bits = 101111 000010 0010
|
||||
000010 = 16 = g
|
||||
0010(00) = 4 = 4
|
||||
```
|
||||
|
||||
Итоговая строка в `base62`:
|
||||
|
||||
```
|
||||
10111100100010 = Zg4
|
||||
```
|
||||
|
||||
## Сравнение set-строк
|
||||
|
||||
При сравнении set-строк происходит обратный процесс преобразования до получения хэш-значений
|
||||
|
||||
Reference in New Issue
Block a user