Skip to converter

TGZ to JSON — describing two compressed releases as data so the difference is visible

Two tar.gz releases of the same project look identical in a file listing; what changed is inside them. This route unwinds the gzip stream inside the browser tab, reads the tar members and emits a JSON inventory of names, kinds, uncompressed payload lengths, counts and extension grouping. Payloads are described, not unpacked, and nothing is uploaded.

tar mode bits, owner and group names are not carried into ZIP; directories are written as empty entries.

Drop files here or TGZ, up to 12 MB
    Add a file to start.

    Processed on your device. Files aren’t sent anywhere.

    No sign-up. Nothing to install.

    Reading a compressed release as data

    The gzip stream is decompressed and its checksum validated. The reader then validates TAR headers and records supported member names and lengths. Payload bytes are omitted from the resulting JSON, which is a report rather than an extracted copy.

    • Every entry appears with its name and kind, file or directory.
    • File entries report the uncompressed payload length, so two releases can be compared on real size.
    • Directories are listed, which is where an extra bundled folder becomes obvious.
    • Entries appear in the order the tar stored them; sorted-by-name is offered when you want the inventory alphabetical.
    • unsupported entries abort the read with a named error, so the inventory never contains blank rows

    Comparing two inventories

    Convert each release separately and read the two outputs side by side.

    Inventory partWhat a difference means
    counts.entriesone release carries more members than the other
    counts.directoriesan extra or removed folder in the tree
    grouped by extensionnew file types appeared, such as bundled vendored code
    counts.bytestotal payload grew or shrank
    entries[].byteswhich specific member changed size

    What the counts block answers

    The counts block is the part you diff first: entries, files, directories and total bytes give a summary without opening every entry. The symlink and other counts stay at zero, because unsupported entry types are rejected during the read rather than tallied — a release containing symlinks, hardlinks, device entries, PAX or GNU extended headers, traversal or duplicate paths or non-UTF8 names produces an error, not a partial inventory.

    Extension counts describe filenames, not detected file types. A different packager can also add or omit explicit directory records without changing nested file paths. Compare the actual member names before interpreting a changed total.

    What the schema refuses to report

    There are no file contents, no hashes, no modification times and no compression ratio in the output. The gzip header's stored name and time are also not carried into the inventory.

    That keeps the comparison about structure and payload size. If you need contents, unpack the release yourself; the inventory does not extract members to folders and does not classify content.

    Matching inventory values do not prove identical contents: two files can share a name and length while containing different bytes. Use a separate content comparison or known hashes when that distinction matters.

    Diffing the releases

    Bounds apply while the gzip stream decompresses, so a release that inflates is stopped rather than filling memory.

    1. Convert the older .tar.gz to JSON and save the output.
    2. Convert the newer .tar.gz the same way.
    3. Diff counts.entries and counts.directories first.
    4. Read byExtension for extensions that appeared in the newer release.
    5. Compare entries[].bytes for members that grew.
    6. If conversion rejects, read the reason: limits, damaged input, unsupported TAR variants or unsafe names can all prevent an inventory.

    Comparing compressed releases

    Do the byte figures describe compressed storage?
    No. bytes is the uncompressed payload length after the gzip layer and the member are read, which is what the file would be when unpacked.
    Does the inventory include the gzip header name or timestamp?
    No. Gzip header metadata is not preserved in the output; the inventory describes entries inside the archive.
    Can this tell me whether a release is malicious?
    No. It reports names and sizes and rejects unsupported structures; it does not perform malware analysis on the file contents.
    How many entries can a release have?
    At most 200 entries are read, each member is capped at 8 MiB, expanded content is capped at 32 MiB, and expansion is bounded at a 60x ratio.

    Share this converter

    More sharing options