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

Class: I18N_Arabic_CompressStr

Source Location: /Arabic/CompressStr.php

Class Overview


This PHP class compress Arabic string using Huffman-like coding


Author(s):

Copyright:

  • 2006-2016 Khaled Al-Sham'aa

Methods



Class Details

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



Tags:

author:  Khaled Al-Sham'aa <khaled@ar-php.org>
copyright:  2006-2016 Khaled Al-Sham'aa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Methods


static method bits2hex [line 359]

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 321]

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 194]

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 213]

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 382]

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 258]

static integer length( binary $bin)

Retrieve the original string length



Tags:

return:  Original string length
author:  Khaled Al-Sham'aa <khaled@ar-php.org>
access:  public


Parameters:

binary   $bin   Compressed binary string

[ Top ]

static method search [line 234]

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 str2bits [line 287]

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 ]

method setLang [line 159]

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 ]


Documentation generated on Fri, 01 Jan 2016 10:25:55 +0200 by phpDocumentor 1.4.0