4 ms·
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
by imran-iq 3y ago
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/gunzip.go#L94 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/gunzip.go#L113 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/gunzip.go#L174 https://github.com/golang/go/blob/go1.21.3/src/compress/gzip...
- morelisp 3y ago"My answer"? I didn't ask a question! I know what the code does, that doesn't make it less bad design.