# gizlang/cab

Windows installer containers, read. A compound file (an .msi) holds named streams, an installer's cabinets among them; a cabinet (.cab) holds files in folders, each stored or compressed with LZX. Layouts: Microsoft's [MS-CFB] and [MS-CAB], and the LZX bitstream of [MS-PATCH] as cabinets use it.

```gizlang
import * as Cab from "gizlang/cab";
```

## Types

### `CabFile`

```gizlang
type CabFile = { name: string; data: bytes; }
```

A file of a cabinet: its name (folders joined by `\`) and its bytes.

- `name`: `string`
- `data`: `bytes`

## Functions

### `compoundStreams`

```gizlang
function compoundStreams(data: bytes): Map<string, bytes> throws string
```

The streams of the compound file DATA by name (an installer's names decoded).

Effects: fail, read, write, console, io, alloc.

### `cabFiles`

```gizlang
function cabFiles(data: bytes, want: (name: string) => bool): Vec<CabFile> throws string
```

The files of the cabinet DATA whose names WANT takes, unpacked: stored or LZX (MSZIP and Quantum are refused).

Effects: fail, read, write, console, io, alloc.

