From f4cdfce9e28c245c16c2c5383fabd3c39a1efb54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Korpesio?= Date: Thu, 20 Jan 2022 08:26:50 +0100 Subject: [PATCH] prvy --- sk1a/readme.md | 3 ++- sk2a/compressor.c | 5 +++-- sk2a/readme.md | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sk1a/readme.md b/sk1a/readme.md index c4ba955..db621f2 100644 --- a/sk1a/readme.md +++ b/sk1a/readme.md @@ -25,7 +25,8 @@ return 1; if (backtracking(maze, x + 1, y, size) == 1) { //pohyb dole return 1; } - if (backtracking(maze, x - 1, y, size) == 1) { //pohyb dolava + if (backtracking(maze, x - 1, y, size) == 1) { //pohyb dol + return 1; } if (backtracking(maze, x, y - 1, size) == 1) { //pohyb hore diff --git a/sk2a/compressor.c b/sk2a/compressor.c index e7ee5c4..bbe266d 100644 --- a/sk2a/compressor.c +++ b/sk2a/compressor.c @@ -197,13 +197,14 @@ int myrldecompress(char* buff,int size,char** outbuf){ char length = buff[i + 1]; // 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; char *tempbuf = calloc(size,sizeof(char)); memset(tempbuf,'\0',size); strcpy(tempbuf,*outbuf); *outbuf = tempbuf; - } + }*/ for (int j = 0; j < length; j++){ (*outbuf)[pos] = c; diff --git a/sk2a/readme.md b/sk2a/readme.md index 2316976..051ae94 100644 --- a/sk2a/readme.md +++ b/sk2a/readme.md @@ -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 #include #include