# Sample XZ files for testing decompression, free and CC0

1 XZ test file of 199 KB. A direct URL, the file's SHA-256 and CC0, so curl and CI can fetch it with no signup and no keys.

The page: <https://loremfile.dev/xz>.

An xz file is a single compressed stream rather than an archive: no container, no entry list,
one payload in and one stream out. It compresses harder than gzip and takes longer doing it,
which is why it turns up around software distribution and large logs.

`xz/lorem-1mb.txt.xz` compresses exactly 1,000,000 bytes of Lorem Ipsum, so the ratio you
measure is that of ordinary prose rather than of random noise or a file padded to a round
number. That makes it a realistic figure for a progress bar, a quota calculation or a
back-of-the-envelope estimate of what compression will buy you.

Because it is a stream and not an archive, it is also a good test of whether your code knows
the difference: plenty of tools try to list the contents of an xz file and fail confusingly.

Use it to test decompression, streaming readers and package handling. Related formats:
[GZIP](https://loremfile.dev/gz), [BZIP2](https://loremfile.dev/bz2), [ZSTD](https://loremfile.dev/zst) and [TAR](https://loremfile.dev/tar), the container these usually wrap.

## Files

| Path | Size | MIME | Properties |
|---|---|---|---|
| [`xz/lorem-1mb.txt.xz`](https://loremfile.dev/xz/lorem-1mb.txt.xz) | 199 KB (198,972 bytes) | `application/x-xz` |  |

The same list as JSON: <https://loremfile.dev/xz/index.json>.
