]> git.ipfire.org Git - thirdparty/ccache.git/commit
Add a content size field to the result file header
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 16 Jun 2019 14:42:42 +0000 (16:42 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 16 Jun 2019 19:49:26 +0000 (21:49 +0200)
commit5905237ebb917bcb1bb773431f8e8703899194cb
tree29d4c450d2034ca98f41b8eaf128ac51517cf381
parent6d469ab7c74198041fa957bf98f0bd6b02a4759c
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.
src/ccache.h
src/result.c
src/result.h
src/util.c