wdg-base32 0.1.2

The Base32 Data Encoding
Documentation
impl B32Encode<u32,String> for B32<String>{
    fn encode(data:u32)->String{
        let mut string:String=String::with_capacity(8);
        unsafe{
            let mut vector=&mut string.as_mut_vec();
            vector.resize(8,0);
            let pointer=vector.as_mut_ptr();
            let ptr_alphabet=ALPHABET32.as_ptr();
            *pointer.offset(0)=*ptr_alphabet.offset(((data>>27)&0b11111) as isize);
            *pointer.offset(1)=*ptr_alphabet.offset(((data>>22)&0b11111) as isize);
            *pointer.offset(2)=*ptr_alphabet.offset(((data>>17)&0b11111) as isize);
            *pointer.offset(3)=*ptr_alphabet.offset(((data>>12)&0b11111) as isize);
            *pointer.offset(4)=*ptr_alphabet.offset(((data>>07)&0b11111) as isize);
            *pointer.offset(5)=*ptr_alphabet.offset(((data>>02)&0b11111) as isize);
            *pointer.offset(6)=*ptr_alphabet.offset(((data<<3)&0b11111) as isize);
            *pointer.offset(7)=61;
        }
        return string;
    }
}