package multibase

import (
	
	
	
)

// binaryEncodeToString takes an array of bytes and returns
// multibase binary representation
func binaryEncodeToString( []byte) string {
	 := make([]byte, len()*8)
	encodeBinary(, )
	return string()
}

// encodeBinary takes the src and dst bytes and converts each
// byte to their binary rep using power reduction method
func encodeBinary( []byte,  []byte) {
	for ,  := range  {
		for  := 0;  < 8; ++ {
			if &(1<<uint(7-)) == 0 {
				[*8+] = '0'
			} else {
				[*8+] = '1'
			}
		}
	}
}

// decodeBinaryString takes multibase binary representation
// and returns a byte array
func decodeBinaryString( string) ([]byte, error) {
	if len()&7 != 0 {
		// prepend the padding
		 = strings.Repeat("0", 8-len()&7) + 
	}

	 := make([]byte, len()>>3)

	for ,  := 0, 0;  < len();  =  + 8 {
		,  := strconv.ParseInt([:+8], 2, 0)
		if  != nil {
			return nil, fmt.Errorf("error while conversion: %s", )
		}

		[] = byte()
		++
	}

	return , nil
}