. * @author niel * @copyright 2016 nZEDb */ namespace App\extensions\util; use Illuminate\Support\ServiceProvider; use App\extensions\util\yenc\adapter\NzedbYenc; class Yenc extends ServiceProvider { /** * @param $text yEncoded text to decode back to an 8 bit form. * * @return string 8 bit decoded version of $text. */ public static function decode(&$text) { return NzedbYenc::decode($text); } /** * @param $text * * @return mixed */ public static function decodeIgnore(&$text) { return NzedbYenc::decodeIgnore($text); } /** * @param $data 8 bit data to convert to yEncoded text. * @param string $filename Name of file to recreate as. * @param int $line Maximum number of characters in each line. * to use. * * @return string|\Exception The yEncoded version of $data. */ public static function encode(&$data, $filename, $line = 128) { return NzedbYenc::encode($data, $filename, $line); } }