Arabic
[ class tree: Arabic ] [ index: Arabic ] [ all elements ]

Class: ArCompressStr

Source Location: /sub/ArCompressStr.class.php

Class Overview


This PHP class compress Arabic string using Huffman-like coding


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Methods



Class Details

[line 125]
This PHP class compress Arabic string using Huffman-like coding



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2009 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Methods


static method compress [line 180]

static binary compress( string $str, [string $inputCharset = null], [object $main = null])

Compress the given string using the Huffman-like coding



Tags:

return:  The compressed string in binary format
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   The text to compress
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

static method decompress [line 205]

static string decompress( binary $bin, [string $outputCharset = null], [object $main = null])

Uncompress a compressed string



Tags:

return:  The original uncompressed string
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

binary   $bin   The text compressed by compress().
string   $outputCharset   (optional) Output charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set output charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

static method length [line 261]

static integer length( binary $bin)

Retrieve the origenal string length



Tags:

return:  Origenal string length
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

binary   $bin   Compressed binary string

[ Top ]

static method search [line 233]

static boolean search( binary $bin, string $word, [string $inputCharset = null], [object $main = null])

Search a compressed string for a given word



Tags:

return:  True if found and False if not found
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

binary   $bin   Compressed binary string
string   $word   The string you looking for
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

static method setLang [line 142]

static boolean setLang( string $lang)

Set required _encode and _decode hash of most probably character in selected language



Tags:

return:  TRUE
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $lang   [en, fr, gr, it, sp, ar] Language profile selected

[ Top ]


Documentation generated on Tue, 18 Aug 2009 00:12:48 +0300 by phpDocumentor 1.4.0