wdg-base32 0.1.2

The Base32 Data Encoding
Documentation
impl B32Encode<u8,String> for B32<String>{
    fn encode(data:u8)->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>>3)&0b11111) as isize);
            *pointer.offset(1)=*ptr_alphabet.offset(((data<<2)&0b11111) as isize);
            *pointer.offset(2)=61;
            *pointer.offset(3)=61;
            *pointer.offset(4)=61;
            *pointer.offset(5)=61;
            *pointer.offset(6)=61;
            *pointer.offset(7)=61;
        }
        return string;
    }
}