XipZ
Mini packer ▶►▸ for small programs.
Functions
qadz.hh File Reference

Crunching and writing stub for qadz. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::vector< uint8_t > crunch_qadz (const Data &data)
 
std::ostream & write_qadz_stub (std::ostream &out, uint16_t size, uint16_t loadaddr, uint16_t jmp)
 write the decrunch stub More...
 

Detailed Description

Crunching and writing stub for qadz.

Definition in file qadz.hh.

Function Documentation

◆ crunch_qadz()

std::vector<uint8_t> crunch_qadz ( const Data data)

Compress data using the LZ77-alike compression.

Parameters
databinary data to compress
Returns
compressed data

< temporary buffer to collect plain tokens

Definition at line 114 of file qadz.cc.

◆ write_qadz_stub()

std::ostream& write_qadz_stub ( std::ostream &  out,
uint16_t  size,
uint16_t  loadaddr,
uint16_t  jmp 
)

write the decrunch stub

The decrunching stub is written and all parameters like decrunching address and jump address are adjusted. Please take care to adjust all the defines above otherwise the code will probably just crash. It may also fry your cat so be careful!

Parameters
outoutput stream to write to
sizenumber of compressed bytes
loadaddroriginal load address of the data
jmpjump address to jump after decrunching
Returns
output stream

Definition at line 72 of file qadz.cc.