original_string: protected function _transferDecode($fp, $encoding)
      {
          /* If the contents are empty, return now. */
          fseek($fp, 0, SEEK_END);
          if (ftell($fp)) {
              switch ($encoding) {
              case 'base64':
                  try {
                      return $this->_writeStream($fp, array(
                          'error' => true,
                          'filter' => array(
                              'convert.base64-decode' => array()
                          )
                      ));
                  } catch (ErrorException $e) {}
  
                  rewind($fp);
                  return $this->_writeStream(base64_decode(stream_get_contents($fp)));
  
              case 'quoted-printable':
                  try {
                      return $this->_writeStream($fp, array(
                          'error' => true,
                          'filter' => array(
                              'convert.quoted-printable-decode' => array()
                          )
                      ));
                  } catch (ErrorException $e) {}
  
                  // Workaround for Horde Bug #8747
                  rewind($fp);
                  return $this->_writeStream(quoted_printable_decode(stream_get_contents($fp)));
  
              case 'uuencode':
              case 'x-uuencode':
              case 'x-uue':
                  /* Support for uuencoded encoding - although not required by
                   * RFCs, some mailers may still encode this way. */
                  $res = Horde_Mime::uudecode($this->_readStream($fp));
                  return $this->_writeStream($res[0]['data']);
              }
          }
  
          return $fp;
      }
code: protected function _transferDecode($fp, $encoding)
      {
          /* If the contents are empty, return now. */
          fseek($fp, 0, SEEK_END);
          if (ftell($fp)) {
              switch ($encoding) {
              case 'base64':
                  try {
                      return $this->_writeStream($fp, array(
                          'error' => true,
                          'filter' => array(
                              'convert.base64-decode' => array()
                          )
                      ));
                  } catch (ErrorException $e) {}
  
                  rewind($fp);
                  return $this->_writeStream(base64_decode(stream_get_contents($fp)));
  
              case 'quoted-printable':
                  try {
                      return $this->_writeStream($fp, array(
                          'error' => true,
                          'filter' => array(
                              'convert.quoted-printable-decode' => array()
                          )
                      ));
                  } catch (ErrorException $e) {}
  
                  // Workaround for Horde Bug #8747
                  rewind($fp);
                  return $this->_writeStream(quoted_printable_decode(stream_get_contents($fp)));
  
              case 'uuencode':
              case 'x-uuencode':
              case 'x-uue':
                  /* Support for uuencoded encoding - although not required by
                   * RFCs, some mailers may still encode this way. */
                  $res = Horde_Mime::uudecode($this->_readStream($fp));
                  return $this->_writeStream($res[0]['data']);
              }
          }
  
          return $fp;
      }
code_tokens: protected function _transferDecode ( $ fp , $ encoding ) { /* If the contents are empty, return now. */ fseek ( $ fp , 0 , SEEK_END ) ; if ( ftell ( $ fp ) ) { switch ( $ encoding ) { case 'base64' : try { return $ this -> _writeStream ( $ fp , array ( 'error' => true , 'filter' => array ( 'convert.base64-decode' => array ( ) ) ) ) ; } catch ( ErrorException $ e ) { } rewind ( $ fp ) ; return $ this -> _writeStream ( base64_decode ( stream_get_contents ( $ fp ) ) ) ; case 'quoted-printable' : try { return $ this -> _writeStream ( $ fp , array ( 'error' => true , 'filter' => array ( 'convert.quoted-printable-decode' => array ( ) ) ) ) ; } catch ( ErrorException $ e ) { } // Workaround for Horde Bug #8747 rewind ( $ fp ) ; return $ this -> _writeStream ( quoted_printable_decode ( stream_get_contents ( $ fp ) ) ) ; case 'uuencode' : case 'x-uuencode' : case 'x-uue' : /* Support for uuencoded encoding - although not required by
                   * RFCs, some mailers may still encode this way. */ $ res = Horde_Mime :: uudecode ( $ this -> _readStream ( $ fp ) ) ; return $ this -> _writeStream ( $ res [ 0 ] [ 'data' ] ) ; } } return $ fp ; }
docstring: Decodes the contents of the part to binary encoding.
  
  @param resource $fp      A stream containing the data to decode.
  @param string $encoding  The original file encoding.
  
  @return resource  A new file resource with the decoded data.
docstring_tokens: Decodes the contents of the part to binary encoding .