Add a content size field to the result file header
The content size field says how much uncompressed data is stored in the
file. This can be used to relatively quickly determine the compression
rate for the whole cache by only inspecting each file’s header insted of
having to read and decompress all files.
Since the content size needs to be calculated before actually adding the
content to the result file, I’ve reverted back to let the format use a
“number of entries” field instead of an EOF marker (similar to Anders
Björklund’s original work in
0399be2d) since the information about the
number of files now has to be known beforehand.
Another subtle change is that the compression level field now is int8_t
instead of uint8_t to make it possible to record negative levels.