Skip to content
Contribute

LZIS · block stream

Block-compression wrapper with a physical index. Its decoded contents must be identified separately.

Documented edition: Imperivm HD · Partial documentation

LZIS can occur in saved games, profiles, replays and content packs. Its signature describes the block stream rather than the final document type.

Identify the contents again after decoding. For example, the RandomMapSettlements.bfhp settlement library contains an HPFS volume. Do not automatically treat an LZIS file as a map or ZIP archive.

The number of stored offsets is n = max(1, ceil(logical size / block size)). No additional final offset is stored: the last block ends at the physical stream length.

Byte position Size Contents
0 4 bytes ASCII signature LZIS
4 4 bytes Decoded logical size
8 4 bytes Logical block size
12 1 byte Mode
13 1 byte Byte without a completely documented meaning
14 4 × n bytes Physical position of each block

A physical span shorter than its block’s logical length is interpreted as compressed. If it reaches that length without exceeding the block size, it contains raw bytes. A span exceeding the block size does not satisfy that reading rule.

Compression uses canonical prefix codes and references to earlier data. Similarity between some tables and Deflate does not make the stream a standard zlib or Deflate file.

Decoded-file coverage is for mode 2. Other modes and compatible writing or recompression are not documented as complete workflows in this entry.

Do not infer contents from the extension alone or assume one block size across all uses. This entry summarizes the container and its reading rules; it does not include a codec implementation.

Suggest a better description

Write how you would explain this entry. Your proposal will be held in a private inbox for review.

0 / 4000

Proposals are not published automatically. Do not include personal information in your description.