MCPcopy
hub / github.com/scrapy/scrapy / gzip_magic_number

Function gzip_magic_number

scrapy/utils/gz.py:39–40  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

37
38
39def gzip_magic_number(response: Response) -> bool:
40 return response.body[:3] == b"\x1f\x8b\x08"

Callers 4

_get_sitemap_bodyMethod · 0.90
test_gunzip_basicFunction · 0.90
test_is_gzipped_emptyFunction · 0.90

Calls

no outgoing calls

Tested by 3

test_gunzip_basicFunction · 0.72
test_is_gzipped_emptyFunction · 0.72