Document AddCompressed, remove some unneeded arguments and fix a memory leak.
Also, some cosmetic fixes and correct a type for better understanding of the program.