The  command runs all the directories (-type d) found in the $LOGDIR directory wherein a file's data has been modified within the last 24 hours (-mtime +0) and compresses them (compress -r {}) to save disk space.
find $LOGDIR -type d -mtime +0 -exec compress -r {} \;