MCPcopy Create free account
hub / github.com/chrxh/alien / gzip_decompressor

Method gzip_decompressor

external/cpp-httplib/httplib.h:3095–3106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3093 }
3094
3095 inline gzip_decompressor::gzip_decompressor() {
3096 std::memset(&strm_, 0, sizeof(strm_));
3097 strm_.zalloc = Z_NULL;
3098 strm_.zfree = Z_NULL;
3099 strm_.opaque = Z_NULL;
3100
3101 // 15 is the value of wbits, which should be at the maximum possible value
3102 // to ensure that any gzip stream can be decoded. The offset of 32 specifies
3103 // that the stream type should be automatically detected either gzip or
3104 // deflate.
3105 is_valid_ = inflateInit2(&strm_, 32 + 15) == Z_OK;
3106 }
3107
3108 inline gzip_decompressor::~gzip_decompressor() { inflateEnd(&strm_); }
3109

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected