User Tools

Site Tools


tanszek:oktatas:techcomm:lzw_coding

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tanszek:oktatas:techcomm:lzw_coding [2024/11/18 20:26] – [Summary of LZW Compression] kneheztanszek:oktatas:techcomm:lzw_coding [2024/11/19 07:54] (current) knehez
Line 136: Line 136:
 int tableElements = 5; int tableElements = 5;
  
-main()+int isInsxhTable(char *s) 
 +
 +    for(int i = 0; i < tableElements; i++) 
 +    { 
 +        if(strcmp(sxhTable[i], s) == 0) 
 +        { 
 +            return i; 
 +        } 
 +    } 
 +    return -1; 
 +
 + 
 +int main()
 { {
     char text[] = "dabbacdabbacdabbacdabbacdee";     char text[] = "dabbacdabbacdabbacdabbacdee";
Line 160: Line 172:
         printf("%d,", lastFoundIndex + 1);         printf("%d,", lastFoundIndex + 1);
     }     }
-} 
- 
-int isInsxhTable(char *s) 
-{ 
-    for(int i = 0; i < tableElements; i++) 
-    { 
-        if(strcmp(sxhTable[i], s) == 0) 
-        { 
-            return i; 
-        } 
-    } 
-    return -1; 
 } }
  
 </sxh> </sxh>
tanszek/oktatas/techcomm/lzw_coding.1731961588.txt.gz · Last modified: 2024/11/18 20:26 by knehez