public static function decodeZookoToByteStr($encodedStr) {
        // Check input string.
        $pattern = '/[a-km-uw-z13-9]*/';
        self::_checkEncodedString($encodedStr, $pattern);

        // Get length (byte count) of encoded string.
        $encodedStrLen = self::_byteCount($encodedStr);

        // Add padding character to mapping.
        $mapping = self::$_zookoFlippedAlphabet + array('_' => 0);

        // Get decoded byte-string.
        $byteStr = self::_decodeToByteStr($encodedStr, $encodedStrLen, $mapping, '_', true);
        
        // Return byte-string.
        return $byteStr;
    }
public static function decodeZookoToByteStr($encodedStr) {
        // Check input string.
        $pattern = '/[a-km-uw-z13-9]*/';
        self::_checkEncodedString($encodedStr, $pattern);

        // Get length (byte count) of encoded string.
        $encodedStrLen = self::_byteCount($encodedStr);

        // Add padding character to mapping.
        $mapping = self::$_zookoFlippedAlphabet + array('_' => 0);

        // Get decoded byte-string.
        $byteStr = self::_decodeToByteStr($encodedStr, $encodedStrLen, $mapping, '_', true);
        
        // Return byte-string.
        return $byteStr;
    }
public static function decodeZookoToByteStr ( $ encodedStr ) { // Check input string. $ pattern = '/[a-km-uw-z13-9]*/' ; self :: _checkEncodedString ( $ encodedStr , $ pattern ) ; // Get length (byte count) of encoded string. $ encodedStrLen = self :: _byteCount ( $ encodedStr ) ; // Add padding character to mapping. $ mapping = self :: $ _zookoFlippedAlphabet + array ( '_' => 0 ) ; // Get decoded byte-string. $ byteStr = self :: _decodeToByteStr ( $ encodedStr , $ encodedStrLen , $ mapping , '_' , true ) ; // Return byte-string. return $ byteStr ; }
Decodes a Zooko encoded string to a byte-string.

Expects an encoded string according to the base 32 encoding exposed by
Zooko O'Whielacronx
(http://philzimmermann.com/docs/human-oriented-base-32-encoding.txt).
Throws an exception if the encoded string is malformed.

This implementation will always decode full bytes (analog to the base 32
encoding described in RFC 4648), which is one possible proceeding
mentioned in the referred document.

@param string $encodedStr The encoded string.
@return string The decoded byte-string.
Decodes a Zooko encoded string to a byte - string .