ToolXkit Icon

Sample BZIP2 files

Free BZIP2 test files from 5 KB to 1 GB. Pick a size and download, or type any size you need.

  • 5 KB BZIP2

    Compressed log file

  • 10 KB BZIP2

    Compressed log file

  • 100 KB BZIP2

    Compressed log file

  • 500 KB BZIP2

    Compressed log file

  • 1 MB BZIP2

    Compressed log file

  • 5 MB BZIP2

    Made on your device

  • 10 MB BZIP2

    Made on your device

  • 25 MB BZIP2

    Made on your device

  • 50 MB BZIP2

    Made on your device · saved in pieces

  • 100 MB BZIP2

    Made on your device · saved in pieces

  • 500 MB BZIP2

    Made on your device · saved in pieces

  • 1 GB BZIP2

    Made on your device · saved in pieces

Need another size?

Type any size from 5 KB to 1.00 GB. The file is made on your device. Nothing is uploaded or stored.

Free for any use, including commercial. Made by this site, with no third-party content and no signup.

What is inside

  • A server log with ISO timestamps and mixed log levels
  • Several complete bzip2 streams joined back to back: 1 in the 10 KB file, 8 in the 1 MB, 33 in the 25 MB
  • bzip2 decompresses all the streams into one continuous log
  • Each file ends a little under its labelled size, because only whole streams are used
  • Compressed with bzip2 at level 9

Try it with these tools

They run in your browser. The file you downloaded stays on your device.

About BZIP2 files

bzip2 is a single-file compressor released in 1996. It uses the Burrows–Wheeler transform, which usually packs text smaller than gzip does, but compresses and decompresses more slowly.

It is common for source code releases, scientific data and big text dumps, such as Wikipedia’s database exports. Parallel tools like pbzip2 split the work into blocks and write several bzip2 streams into one .bz2 file.

That is where things go wrong. The bzip2 program treats back-to-back streams as one file, but some libraries and older decoders stop at the end of the first stream. The result looks fine, but part of the data is missing and no error is shown.

Sources: bzip2 and libbzip2 manual (sourceware.org) · bzip2 format description (Library of Congress)

Questions

Why is the file made of several bzip2 streams?

Joining whole streams is the only clean way to build a large .bz2 to a set size. It also matches what parallel compressors produce, so it is a useful test: a correct decoder unpacks every stream, not just the first.

How can I tell if my tool stopped after the first stream?

Compare the unpacked size with what bzip2 -dc gives. If your tool returns much less, it read only the first stream.

Why is the 10 KB file under 10,000 bytes?

bzip2 has no filler field, so the file cannot be padded to an exact byte. It holds one whole stream of about 9.7 KB.

Also searched as: sample bzip2 file download, dummy bz2 file, test bz2 file, example bzip2 file, 1 MB bz2 file, 10 MB bz2 file, 100 MB bz2 file, 1 GB bz2 file, free bz2 for testing.

For developers: exact bytes and SHA-256

Sizes are decimal (1 MB = 1,000,000 bytes). The hosted files never change between builds, so these checksums stay valid.

FileBytesSHA-256
sample-5kb.bz2 4,985 bytes 7664247e0cb9146d1b2bea33d2b29f444455f86ad74b7b8cd738b4d161a141de
sample-10kb.bz2 9,739 bytes 9b8e0aaea269a2278dbfc553cc6f26127d88b88b6b4604ca5129c546f7cec6d5
sample-100kb.bz2 99,928 bytes 1016e55d39057046f857a9fde7b16c9fbf98616efa9e36cd94b12921ceab1ad9
sample-500kb.bz2 499,409 bytes cf78da1767450157d3a057739b116db3fd4fd348ec41dc58cf4536bc9e917ae9
sample-1mb.bz2 999,529 bytes 7d79b212d84eab77968f1bb58e794dcabc7612951b72f58a53961684a70aa073