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.
import * as Cab from "gizlang/cab";Types
CabFile
type CabFile = { name: string; data: bytes; }A file of a cabinet: its name (folders joined by \) and its bytes.
name:stringdata:bytes
Functions
compoundStreams
function compoundStreams(data: bytes): Map<string, bytes> throws stringThe streams of the compound file DATA by name (an installer's names decoded).
Effects: fail, read, write, console, io, alloc.
cabFiles
function cabFiles(data: bytes, want: (name: string) => bool): Vec<CabFile> throws stringThe 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.