IPFS SHA1 hash calculation

I’m trying to figure out how hash is calculated:

$ cat a
test
$ shasum a
c1f91394e57f9f83  a
$ ipfs block put --mhtype sha1 a
z8bviymLyCR4SuseR9FPg6GEBmiRJoPbx

The base58 as base16 is:
0272af3c8425a2fbafced9be09d278df94c152724de57f9f83

These two are not the same.

With SHA256 things look better:
$ ipfs block put a
QmegQ7o5oBM8JaZGqnBo9ScNwfRY9eYo7GQapuBsX2kc9F
$ shasum -a 256 a
f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2 a

The base16 this type is
f2ca1bb6c7e907d06dafe4687e579fce76b37e4e93b7605022da52e6ccc26fd2

What am I missing?

As far as I can see from the docs, SHA1 hash should look like:
1114 …

But instead it starts with
0272 …

Oh, initial “z” is not part of the base58.
Move along. Nothing to see here