What is the difference between a85encode and b85encode?

Python 3.4 added and (and their corresponding decoding functions). a85encode b85encode

What is the difference between the two? The documentation mentions, "They differ in details, such as the character map used for encoding," but this seems overly vague.

+4
source share
2 answers

Ascii85 is the predecessor of Base85. The main difference between the two is that character sets are used. The revised Base85 came about as a result of RFC 1924 , which was introduced in 1996 and should be compatible with things like IPv6, JSON, Git, etc.

Ascii85 :

ASCII 33 ("!") to ASCII 117 ("u") 

Base85 RFC1924:

09, A–Z, a–z, !#$%&()*+-;<=>?@^_`{|}~

Base85:

"',./:[]\\

Base85 , 128- IPv6-, 20- -85 ( ), 32- .

a85encode b85encode / Ascii85 Base85 .

+5

a85encode :

!"#$%&'()*+,-./0123456789:;<=>?@
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`
abcdefghijklmnopqrstu

z ( !!!!!).

b85encode :

0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
!#$%&()*+-;<=>?@^_`{|}~

.


, a85encode. ( ) C, ASCII, , , .

+4

Source: https://habr.com/ru/post/1625675/


All Articles