benilla-re systems structs docs

Bzip2Compress

function · storm · unreached

Address
0x660b80 · 133 bytes, up to 0x660c04
Signature
void __fastcall (void *dest, uint32_t *destSize, const void *source, uint32_t sourceSize, uint32_t *flag, uint32_t unused)
Meaning
Compresses a buffer with bzip2 at block size 9, giving the source size back when the output does not fit
Confidence
verified, proof two
Finding
storm/format#compression-codecs

Finding: Compression codecs in storm: the archive format

The table 0x80f9ec pairs each codec bit with its compressor in the order 0x40, 0x80, 0x20, 0x01, 0x02, 0x10; only 0x6614f0, reached only from the unreached 0x661a30, reads it. The compressor of bit 0x10 is bzip2: 0x660b80(dest, &destSize, source, sourceSize, &flag, unused) calls 0x738cd0 with the block size 9, verbosity 0 and work factor 0. An answer of −8, output too small, sets destSize to sourceSize; any other non-zero answer raises the error 0x85100083 with the text bzip2Compress:%d. The flag is set to 0 on every path.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.