Skip to content

Commit cf44e4b

Browse files
committed
Tests: Add a few test files.
1 parent 39f4a1a commit cf44e4b

File tree

6 files changed

+19
-0
lines changed

6 files changed

+19
-0
lines changed

tests/files/README

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
good-0catpad-empty.xz has two zero-Block Streams concatenated with
4242
four-byte Stream Padding between the Streams.
4343

44+
good-2cat.xz has two Streams with one Block each.
45+
4446
good-1-check-none.xz has one Stream with one Block with two
4547
uncompressed LZMA2 chunks and no integrity check.
4648

@@ -292,6 +294,11 @@
292294
Uncompressed Size bytes of output will have been produced but
293295
the LZMA2 decoder doesn't indicate end of stream.
294296

297+
bad-3-corrupt_lzma2.xz has three Streams in it. The first and third
298+
streams are valid xz Streams. The middle Stream has a correct Stream
299+
Header, Block Header, Index and Stream Footer. Only the LZMA2 data
300+
is corrupt. This file should decompress if --single-stream is used.
301+
295302

296303
3. Descriptions of Individual .lzma Files
297304

@@ -308,6 +315,14 @@
308315
will give an error at the end of the file after producing the
309316
correct uncompressed output.
310317

318+
good-small_compressed.lzma was created with a small dictionary (2^16).
319+
It contains the string "Hello World" repeated 100,000 times. This tests
320+
match decoding and wrapping the dictionary.
321+
322+
good-large_compressed.lzma was created with a mix of repeated
323+
characters and random data to test a data stream containing many
324+
matches and many literals.
325+
311326

312327
3.2. Bad Files
313328

@@ -329,6 +344,10 @@
329344
bad-too_small_size-without_eopm-3.lzma is like -1 above but instead
330345
of a literal the problem occurs in the middle of a match.
331346

347+
bad-dict_size.lzma has a valid dictionary size according to the .lzma
348+
File Format, but will be rejected by XZ Utils because it is not 2^n or
349+
2^n + 2^(n-1).
350+
332351

333352
4. Descriptions of Individual .lz (lzip) Files
334353

tests/files/bad-3-corrupt_lzma2.xz

484 Bytes
Binary file not shown.

tests/files/bad-dict_size.lzma

41 Bytes
Binary file not shown.

tests/files/good-2cat.xz

136 Bytes
Binary file not shown.
34.6 KB
Binary file not shown.
258 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)