prvy
This commit is contained in:
parent
f1770847de
commit
f4cdfce9e2
@ -25,7 +25,8 @@ return 1;
|
|||||||
if (backtracking(maze, x + 1, y, size) == 1) { //pohyb dole
|
if (backtracking(maze, x + 1, y, size) == 1) { //pohyb dole
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (backtracking(maze, x - 1, y, size) == 1) { //pohyb dolava
|
if (backtracking(maze, x - 1, y, size) == 1) { //pohyb dol
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (backtracking(maze, x, y - 1, size) == 1) { //pohyb hore
|
if (backtracking(maze, x, y - 1, size) == 1) { //pohyb hore
|
||||||
|
@ -197,13 +197,14 @@ int myrldecompress(char* buff,int size,char** outbuf){
|
|||||||
char length = buff[i + 1];
|
char length = buff[i + 1];
|
||||||
|
|
||||||
// ak nam nebude stacit miesto v *outbuf, treba allocovat viac
|
// ak nam nebude stacit miesto v *outbuf, treba allocovat viac
|
||||||
while((length + pos) > (size - 1)){
|
//zistil som ze pri velkosti 10 MB to nebude nutne
|
||||||
|
/*while((length + pos) > (size - 1)){
|
||||||
size *= 2;
|
size *= 2;
|
||||||
char *tempbuf = calloc(size,sizeof(char));
|
char *tempbuf = calloc(size,sizeof(char));
|
||||||
memset(tempbuf,'\0',size);
|
memset(tempbuf,'\0',size);
|
||||||
strcpy(tempbuf,*outbuf);
|
strcpy(tempbuf,*outbuf);
|
||||||
*outbuf = tempbuf;
|
*outbuf = tempbuf;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
for (int j = 0; j < length; j++){
|
for (int j = 0; j < length; j++){
|
||||||
(*outbuf)[pos] = c;
|
(*outbuf)[pos] = c;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// najprv robim kompresiu algoritmu runlength a potom lz78, ak sa robi nasledne dekompresia je to naopak najprv dekompresia lz78 a potom runlength.
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user