[mapguide-users] Issues selecting a feature with custom coding

Kenneth, GEOGRAF A/S ks at geograf.dk
Fri Jan 11 03:10:24 EST 2008


The entire line read:
The process is repeated on the remaining data until fewer than four 
octets remain. If three octets remain, they are processed normally. If 
fewer than three octets (24 bits) are remaining to encode, the input 
data is right-padded with zero bits to form an integral multiple of six 
bits.

This happens because you need three bytes (aka octets) to produce 4 base 
64 characters. If you have exactly three bytes left (meaning less than 
four), you are done. If you have one or two bytes left, you must pad it 
with the "=" character, and you are done. If you have four or more bytes 
left, run again. So, the buffer is not 24 bits, but the algorithm is 
done when there are less than 24 bits present in the buffer.

I hope that clears it up.

Regards, Kenneth, GEOGRAF A/S



nclayton skrev:
> A couple of things in the article weren't clear to me...such as:
> An octet is a group of 8 bits. (I understand this)
> "The process is repeated on the remaining data until fewer than four octets
> remain"...if it's a 24 bit buffer, it's always fewer than 4 octets correct?
> Since 24 / 8 = 3?
> Or is the article using the term octet to describe the 6 bit chunks used to
> decide the index for the key string?
>
> So far this code is working and i'm able to select my parcel feature, but
> I'm afraid it may fall through at some point. Any clearity on the subject
> will be much appreciated 
>
> Nick
>   


More information about the mapguide-users mailing list