I have very little experience with compression algorithms; my experience just comes from running the tar czvf command. Is there a way to compress a char array in C?
My main focus is speed and memory optimization. I’m receiving data from serial ports, and then writing them out to a log file right now. I want to compress/encrypt the data before I write it to the log file because I have limited harddrive space. I am also storing the information in ASCII format, because I have to pack it with a timestamp. What method should I look into for compressing this information? Or is there some library I can look into to help?
zlib has already been mentioned in the comments. Since you mention ASCII, you might be interested in particular in the functions: