[De]compress, javadoc + error checking added