Elysia Tools

Browse tools, examples, visual explainers, and topic guides from one clear workspace.

Top Categories

Hubs

Language
ZHESPTRUFRDEEN

Elysia Tools

Navigation

Media

Inspect XZ compression and the TAR inside it

Separate compressed size, archive entries and payload bytes without extracting files.

Samples

Entries inside this sample collection

FileSimple

Sample Archive

A XZ compressed archive sample for in-browser preview

Difficulty

1/10

Tags

xz, archive, compressed

sample-archive.tar.xz

XZ · 704 B

Download fileOpen in new tab
fileSize
704 B
format
XZ
extension
.tar.xz

Tools

Tools frequently paired with this sample

Related

Related sample collections

Related

Related workflows

Tool usage guide

Sample-focused context for search and workflow understanding

Overview

This 704-byte .tar.xz fixture expands to a 6,144-byte TAR stream. XZ is the compression layer; TAR supplies the file names and directory entries. Neither size is the total file payload.

Limits

These checks cover this one small archive. They neither execute payloads nor prove all archives are safe; no compression ratio or performance recommendation is generalized.

How it works

  1. 1Sample Archive · Download file / Open in new tab
  2. 2Download the named card as sample-archive.tar.xz and run the Python 3 snippets locally in sequence. The decoder caps memory at 32 MiB and output at 100,000 bytes; TAR is inspected in memory without extract, shell commands or opening member contents.

Edge cases & common failures

  • Limits

    These checks cover this one small archive. They neither execute payloads nor prove all archives are safe; no compression ratio or performance recommendation is generalized.

Examples

1. Verify the bounded XZ stream

How to use

Sample Archive — Download the named card as sample-archive.tar.xz and run the Python 3 snippets locally in sequence. The decoder caps memory at 32 MiB and output at 100,000 bytes; TAR is inspected in memory without extract, shell commands or opening member contents.

from pathlib import Path
import lzma
with Path("sample-archive.tar.xz").open("rb") as f:
    b = f.read(10001)
assert len(b) == 704 and b[:6] == bytes.fromhex("FD377A585A00")
d = lzma.LZMADecompressor(format=lzma.FORMAT_XZ, memlimit=32*1024*1024)
raw = d.decompress(b, max_length=100001)
assert len(raw) <= 100000 and d.eof and not d.unused_data
assert d.check == lzma.CHECK_CRC64
print(len(b), len(raw), "CRC64")

Outcome

The header starts with FD377A585A00. The standard decoder reaches EOF with CRC64 checking and no trailing stream data, producing 6,144 bytes within the cap. This is not a benchmark or a browser compatibility test.

2. Count files separately from directories

How to use

Sample Archive — Download the named card as sample-archive.tar.xz and run the Python 3 snippets locally in sequence. The decoder caps memory at 32 MiB and output at 100,000 bytes; TAR is inspected in memory without extract, shell commands or opening member contents.

import io, tarfile
archive = tarfile.open(fileobj=io.BytesIO(raw), mode="r:")
members = archive.getmembers()
assert len(members) == 6
assert all(m.isfile() or m.isdir() for m in members)
assert all(not m.name.startswith("/") and ".." not in m.name.split("/") for m in members)
files = [m for m in members if m.isfile()]
dirs = [m for m in members if m.isdir()]
assert [m.size for m in files] == [324, 216, 197, 75]
print(len(files), len(dirs), sum(m.size for m in files))

Outcome

The TAR has six entries: four regular files and two directories. The regular files have declared sizes 324, 216, 197 and 75 bytes, totaling 812. A .txt filename inside images is not evidence of an actual photograph.

3. Account for TAR padding

How to use

Sample Archive — Download the named card as sample-archive.tar.xz and run the Python 3 snippets locally in sequence. The decoder caps memory at 32 MiB and output at 100,000 bytes; TAR is inspected in memory without extract, shell commands or opening member contents.

header_bytes = len(members)*512
padded_data = sum(((m.size+511)//512)*512 for m in members)
assert all(m.offset_data == m.offset+512 for m in members)
end = max(m.offset_data+((m.size+511)//512)*512 for m in members)
assert end == header_bytes+padded_data
assert raw[end:] == bytes(1024)
for m in files:
    stop = m.offset_data+((m.size+511)//512)*512
    assert raw[m.offset_data+m.size:stop] == bytes(stop-m.offset_data-m.size)
print(header_bytes, padded_data, len(raw)-end, len(raw))
archive.close()

Outcome

Six 512-byte headers consume 3,072 bytes. Each of the four nonempty files occupies one padded 512-byte block, totaling 2,048. Two zero blocks add 1,024. The sum is 6,144 bytes; padding is not extra user content.

FAQ

Why do 704, 812 and 6,144 differ?

704 is the compressed file size, 812 is the sum of regular-file payload lengths, and 6,144 includes TAR headers and padding before compression.

Hub

Infer JSON Schema from Samples and Spreadsheets

Derive a reviewable JSON Schema draft from representative JSON samples or XLSX rows, then inspect types, requiredness, nulls, and outliers before treating it as a contract.

Hub

Stream Copy, Remux, and Media Packaging

Inspect streams, remux containers, trim by timestamp, mux tracks, softmux subtitles, embed cover art, and batch rewrap media while preserving source quality.

Hub

One Photo to a Platform-Ready Social Media Image Kit

Turn a single master photo into correctly sized crops for Instagram, TikTok, LinkedIn, and X, preview caption-safe zones, build split grids and collages, and add clearly named styled variants when the channel voice allows them.

Hub

Podcast Episode Audio and RSS Publication Preflight

Check one finished podcast episode against its RSS entry, verify final-file size, type and duration, and separately test public media access and player behavior before publication.

Home
Tools3216
Samples593
Visualizations473
Viewers103
Hubs239
Tags333
Images, Audio & Video657

Image, audio, and video processing, conversion, and optimization tools

Math, Date & Finance647

Calculators, numerics, date logic, statistics, and finance tools

Design & Color298

Color, layout, graphics, visual styling, and design helper tools

Text & Writing209

Writing, cleanup, formatting, extraction, and text analysis tools

Developer & Web194

Developer utilities, networking, web debugging, and automation helpers

Conversion & Encoding175

Format, file, archive, unit, and encoding conversion tools

Lead Generation Quiz Launch and Contact Handoff
Memorial Drafts: Family Review and Print Handoff
Private Habit Records: Backup, Restore and Sharing Review
Article to X and LinkedIn Drafts: Fact Review and Handoff
Markdown Interactive Deck Review and Offline Handoff

© 2026 Elysia Tools. All rights reserved.

DocsPricingAboutTerms of ServicePrivacy PolicyCookiesContact

Media

Batch Image Info Viewer

View basic information for multiple images at once - dimensions, format, file size, and metadata presence

Media

Batch EXIF Viewer

View EXIF metadata from multiple images at once

Media

3D Model Viewer & Inspector

Upload an STL, OBJ, GLB or glTF model: exact vertex/triangle counts, bounding-box dimensions, materials, animations and node tree, plus an interactive Three.js viewer (rotate, zoom, shaded/wireframe/normals).

Media

Audio Metadata Viewer

View all metadata tags of an audio file

Development

Hex Editor (File Viewer)

Upload any binary file and inspect it as a classic hex dump with offset, hex bytes, and ASCII columns (read-only)

Development

Game Save Viewer

Drop any game save file — Minecraft NBT, Unreal Engine GVAS, Palworld containers, JSON/XML/INI/Lua text saves, SQLite profiles — and get the detected format, engine versions, key progress fields and a bounded structural tree.

Media

Audio Change Bitrate

Re-encode audio to a new bitrate while keeping the same format

Media

Audio Metadata Compress

Compress or remove metadata and embedded artwork to reduce file size

Media

APK Viewer Samples

A tiny ZIP with an .apk extension, useful for testing archive-versus-application validation.

Media

BZ2 Viewer Samples

A BZip2 compressed archive sample for in-browser preview

Media

ZIP/.cab Format Mismatch Sample

A ZIP payload named .cab for file-format mismatch inspection; not a valid CAB baseline

Media

CBZ Viewer Samples

A CBZ archive sample for in-browser preview

Media

GZ Viewer Samples

A GZip compressed archive sample for in-browser preview

Media

ISO Viewer Samples

A ISO archive sample for in-browser preview