rewrite reads a file, feeding its content through a shell command or a pipeline, and writes it back to the file. It allows for in place compression, for example. For large multi-part archives, you may not otherwise be able to uncompress and recompress the data again because of lack of temporary disk space.
To write again.
write differently; alter the writing of; "The student rewrote his thesis"
rewrite so as to make fit to suit a new or different purpose; "re-write a play for use in schools"