You should try reading the source code and you will get your answer. NewReader[0] calls Reset[1], which calls readHeader[2], which the name should tell you what its doing.
---
0: https://github.com/golang/go/blob/go1.21.3/src/compress/gzip...
1: https://github.com/golang/go/blob/go1.21.3/src/compress/gzip...
2: https://github.com/golang/go/blob/go1.21.3/src/compress/gzip...