I18N_Arabic

# Class: I18N_Arabic_CompressStr Source Location: /Arabic/CompressStr.php
### Class Overview
This PHP class compress Arabic string using Huffman-like coding #### Author(s): Khaled Al-Sham'aa <khaled@ar-php.org> #### Copyright: 2006-2013 Khaled Al-Sham'aa | ### Methods bits2hex bits2str compress decompress hex2bits length search setLang str2bits
### Class Details [line 138] This PHP class compress Arabic string using Huffman-like coding #### Tags:
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
copyright: | 2006-2013 Khaled Al-Sham'aa
link: | http://www.ar-php.org
license: | LGPL
[ Top ] ### Class Methods ### static method bits2hex [line 369]
`static hexadecimal bits2hex( binary $bits)`
Convert binary string into hexadecimal string #### Tags:
return: | The hexadecimal representation of binary string
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
binary | $bits | The binary string to convert
[ Top ] ### static method bits2str [line 331]
`static string bits2str( binary $bits)`
Convert binary string into textual string #### Tags:
return: | The textual representation of binary string
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
binary | $bits | The binary string to convert
[ Top ] ### static method compress [line 205]
`static binary compress( string $str)`
Compress the given string using the Huffman-like coding #### Tags:
return: | The compressed string in binary format
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
#### Parameters:
string | $str | The text to compress
[ Top ] ### static method decompress [line 224]
`static string decompress( binary $bin)`
Uncompress a compressed string #### Tags:
return: | The original uncompressed string
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
#### Parameters:
binary | $bin | The text compressed by compress().
[ Top ] ### static method hex2bits [line 392]
`static binary hex2bits( hexadecimal $hex)`
Convert hexadecimal string into binary string #### Tags:
return: | The binary representation of hexadecimal string
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
hexadecimal | $hex | The hexadezimal string to convert
[ Top ] ### static method length [line 268]
`static integer length( binary $bin)`
Retrieve the origenal string length #### Tags:
return: | Origenal string length
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
#### Parameters:
binary | $bin | Compressed binary string
[ Top ] ### static method search [line 245]
`static boolean search( binary $bin, string $word)`
Search a compressed string for a given word #### Tags:
return: | True if found and False if not found
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
#### Parameters:
binary | $bin | Compressed binary string
string | $word | The string you looking for
[ Top ] ### static method setLang [line 170]
`static object setLang( string $lang)`
Set required encode and binary hash of most probably character in selected language #### Tags:
return: | to build a fluent interface
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | public
#### Parameters:
string | $lang | [en, fr, gr, it, sp, ar] Language profile selected
[ Top ] ### static method str2bits [line 297]
`static binary str2bits( string $str)`
Convert textual string into binary string #### Tags:
return: | The binary representation of textual string
author: | Khaled Al-Sham'aa <khaled@ar-php.org>
access: | protected
#### Parameters:
string | $str | The textual string to convert
[ Top ] Documentation generated on Mon, 14 Jan 2013 17:48:42 +0100 by phpDocumentor 1.4.0