protected function decodePropValue($hex, $string = false)
    {
        $decodePropValue = '';

        $blobs = str_split($hex, 6);

        foreach ($blobs as $blob) {
            $bin = decbin(hexdec($blob));

            $controlY = substr($bin, 4, 6);
            $nibbleY = substr($bin, 10, 4);
            $controlX = substr($bin, 14, 6);
            $nibbleX = substr($bin, 20, 4);

            $byte = $this->nibbleControl($nibbleX, $controlX).$this->nibbleControl($nibbleY, $controlY);

            if ($string) {
                $decodePropValue .= MbString::chr(bindec($byte));
            } else {
                $decodePropValue = $this->dec2hex(bindec($byte)).$decodePropValue;
            }
        }

        return $decodePropValue;
    }
protected function decodePropValue($hex, $string = false)
    {
        $decodePropValue = '';

        $blobs = str_split($hex, 6);

        foreach ($blobs as $blob) {
            $bin = decbin(hexdec($blob));

            $controlY = substr($bin, 4, 6);
            $nibbleY = substr($bin, 10, 4);
            $controlX = substr($bin, 14, 6);
            $nibbleX = substr($bin, 20, 4);

            $byte = $this->nibbleControl($nibbleX, $controlX).$this->nibbleControl($nibbleY, $controlY);

            if ($string) {
                $decodePropValue .= MbString::chr(bindec($byte));
            } else {
                $decodePropValue = $this->dec2hex(bindec($byte)).$decodePropValue;
            }
        }

        return $decodePropValue;
    }
protected function decodePropValue ( $ hex , $ string = false ) { $ decodePropValue = '' ; $ blobs = str_split ( $ hex , 6 ) ; foreach ( $ blobs as $ blob ) { $ bin = decbin ( hexdec ( $ blob ) ) ; $ controlY = substr ( $ bin , 4 , 6 ) ; $ nibbleY = substr ( $ bin , 10 , 4 ) ; $ controlX = substr ( $ bin , 14 , 6 ) ; $ nibbleX = substr ( $ bin , 20 , 4 ) ; $ byte = $ this -> nibbleControl ( $ nibbleX , $ controlX ) . $ this -> nibbleControl ( $ nibbleY , $ controlY ) ; if ( $ string ) { $ decodePropValue .= MbString :: chr ( bindec ( $ byte ) ) ; } else { $ decodePropValue = $ this -> dec2hex ( bindec ( $ byte ) ) . $ decodePropValue ; } } return $ decodePropValue ; }
Decode the property by inspecting the nibbles of each blob, checking
the control, and adding up the results into a final value.

@param string $hex
@param bool   $string Whether or not this is simple string data.

@return string
Decode the property by inspecting the nibbles of each blob checking the control and adding up the results into a final value .