Git's blob object file format is blob <size string>\0<data>
.
The blob-identifying SHA-1 hash is calculated not from the blob contents alone, but from the header-augmented blob data (as described above).
As a purist I do not like that architecture. It mixes the universal property of the data (its SHA1 hash) with some git-specific header.
Another advantage of pure-data blob storage is that the files can be added to the index using "copy-on-write" instead of copying the whole file. The required space could be halved and some operations could become faster.
So, why did Git developers choose to use the header-based format instead of the pure data format?
P.S. AFAIK in the early days of Git the SHA-1 hash was based on the compressed data.