From 5563f9bd3ef1be974efa8b01aa3939ed14f6cbc4 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 26 Nov 2022 16:16:35 +0100 Subject: [PATCH] huffman commenting --- huffman/huffman.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/huffman/huffman.c b/huffman/huffman.c index 00bd631..4293ca9 100644 --- a/huffman/huffman.c +++ b/huffman/huffman.c @@ -8,6 +8,7 @@ #include #include +// designed for 512, but other BUFSIZEs work aswell. Don't make it too big or you will get a SEGVAULT #define BUFSIZE 512 // a single node, only having information for a single byte. @@ -144,7 +145,7 @@ int main(int argc, char *argv[]) { // dump start of file if debugging // FIXME add conditions if the part to print is smaller than 512B if(debug){ - printf("[DEBUG]First 512 bytes are:\n"); + printf("[DEBUG]First %d bytes are:\n", BUFSIZE); fread(buf, 1, BUFSIZE, fptrR); for(int i=0;i