{"uid":"cap_b23xzQ4duYwJqBycWUWw7","slug":"gzip-header-parser-877603d7","name":"GZip Header Parser","description":"Parse a gzip header: method, flags, modification time, original file name, OS and compression hint.","url":"https://file-formats.x402tookit.com/gzip-header?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["hex"],"properties":{"hex":{"type":"string","description":"First bytes of the gzip file as hex, at least 10 (up to 512 bytes)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"os":{"type":["null","string"]},"asOf":{"type":["null","string"]},"name":{"type":["null","string"]},"flags":{"type":["null","object"],"properties":{"name":{"type":["boolean","null"]},"text":{"type":["boolean","null"]},"extra":{"type":["boolean","null"]},"comment":{"type":["boolean","null"]},"headerCrc":{"type":["boolean","null"]}}},"mtime":{"type":["null","number"]},"method":{"type":["null","string"]},"source":{"type":["null","string"]},"comment":{},"reasons":{"type":["array","null"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"complete":{"type":["boolean","null"]},"degraded":{"type":["boolean","null"]},"modified":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"extraBytes":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"bytesExamined":{"type":["null","number"]},"compressionHint":{"type":["null","string"]},"reservedFlagBits":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QtiHOblf8ce5qZh0XWpOx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses the gzip file header from raw hex bytes, returning compression method, flags, modification time, original filename, OS identifier, and compression hint.","exampleAgentPrompt":"Can you parse the gzip header from this file? Here are the first 64 bytes in hex: 1f8b0800000000000003cb4855284e2d2e4e4c4f05000000ffff. I want to know the compression method, any flags set, the modification time, the original filename, and what OS created it.","exampleUseCases":[{"title":"Forensic analysis of unknown gzip archive","prompt":"I found a suspicious gzip file and I've extracted the first 128 bytes as hex: 1f8b0808c4a2b3620003746573742e747874000bcb4855284e2d2e4e4c4f0500. Can you parse the gzip header and tell me the original filename, what OS made it, and when it was last modified?"},{"title":"Validate gzip integrity before processing","prompt":"Before I decompress this data pipeline output, I want to verify the gzip header looks valid — here are the first 32 bytes in hex: 1f8b0800a1b2c3d40003. What compression method is being used and are there any flags or anomalies I should know about?"},{"title":"Identify OS origin of gzip file in audit","prompt":"We're auditing uploaded gzip files for compliance and need to know the originating OS and compression hint for each one. Can you parse this gzip header hex for me: 1f8b0800000000000300cb4855284e2d2e4e4c4f050000000000 and tell me the OS field and compression hint?"}],"resultDescription":"Returns a structured breakdown of the gzip header including: compression method, flags object (text, name, extra, comment, headerCrc booleans), modification time (mtime as Unix timestamp and human-readable string), original filename, OS identifier, compression hint, number of bytes examined, a summary string, a verdict, any reasons or warnings, and flags for whether the parse was complete or degraded.","failureModes":["Hex string too short (fewer than 10 bytes / 20 hex chars) — returns parse error or incomplete result","Invalid hex encoding — returns error if non-hex characters are present","File is not a gzip file (wrong magic bytes 1f8b) — returns failed verdict with reasons","Truncated or corrupt header — returns degraded flag with partial results","Missing required hex query parameter — returns 400 bad request"],"whenToPreferThis":"Use this endpoint when you need to inspect or validate gzip file headers without fully decompressing the file — ideal for forensic analysis, upload validation pipelines, or audit workflows where you only have the raw bytes available. Prefer this over full decompression when you only need metadata (filename, OS, timestamps, flags) and want to avoid the cost of decoding the entire archive.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T13:08:22.574Z","isFirstParty":false,"canonicalSlug":"gzip-header-parser-877603d7"}