-
Notifications
You must be signed in to change notification settings - Fork 0
Mo-Hamail/StringCompression
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The main Idea is very simple, is to create a number system out of the language alphabet (in current code, Arabic characters has been mapped and it can be replaced with any latin characters codes). So, it can be converted back and forth from Decimal number system (base 10) to Arabic number system (base 37) and incase of English it will be a number system with base 27. The benefits are: 1- Less memory foot print, where a string with 8 characters long can be stored in 2 to 4 bytes and a string with with up to 12 characters long can be stored in 8 bytes. 2- Speed, it is faster in string processing and comparison (comparing numbers vs strings). ************************************************************************************************* class CCharMapings: This class is responsible for holding the mapping character arrays between the character representation and the internal representation. It contains two data members they are: BYTE CharMapTable[46]; BYTE NoToCharTable[37]; Its constructor is responsible for filling these 2 arrays. ************************************************************************************************* class CUtilities: Class's methods: 1. ui32Pow and ui64Pow which calculate the power using unsigned integer and unsigned integer 64 bit. 2. ConvertStr13ToNo, ConvertStr6ToNo which convert the string value to an equivalent number. 3. ConvertNoToStr13, ConvertNoToStr6 which convert the number to its equivalent string characters. 4. RemoveUnValidChars which removes any non arabic characters. This class is used while translating the Arabic words in a lexicon, identifying the word, and cleaning the input word for processing.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published