bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Base64 encoding of position and match ID


From: Christian Anthon
Subject: Re: [Bug-gnubg] Base64 encoding of position and match ID
Date: Sat, 28 Apr 2007 18:16:24 +0200

They most likely do, however, you are missing a step. As you can see this number

11100000 01110011 11110000 00000001 00110000 11100000 01110011 11110000
00000001 00110000

is divided in to 10 bytes (binary numbers). Each byte represent an
ascii character and together they form a 10 character long string and
that is the string that you want to base64 encode.

Citing from the manual,

To continue the above example, splitting the 10 8-bit bytes into 14
6-bit groups gives:

111000 000111 001111 110000 000000 010011 000011 100000 011100 111111
000000 000001 001100 000000

In Base64 encoding, these groups are respectively represented as:
4 H P w A T D g c / A B M A

since
A+2^3+2^4+2^5 equals the character "4"
A+2^0+2^1+2^2 equals the character "H"
A+2^0+2^1+2^2+2^3 equals the character "P"
...

So it might be easier for you to do it manually.

Hope this is at least somewhat clear, gotta' go fix supper now.

Christian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]