encode($bytes, $offset, $length); } /** * Decodes the given base-64 string into a byte array. * * @static * @param string $string base-64 encoded string * @return array array containing the decoded bytes */ public static function decode($string) { return self::getInstance()->decode($string); } /** * Gets singleton instance of GTBaseX configured for base-64 encoding/decoding. * * @static * @return GTBaseX singleton instance of GTBaseX */ private static function getInstance() { if (self::$instance == null) { self::$instance = new GTBaseX("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", true, '='); } return self::$instance; } } ?>