If R0 bit 3 is set:
=> R0 = flags
R1 = input size, or -1 means don't return max output size
<= R0 = required workspace size
R1 = maximum output size, or -1 if we don't know or were not asked
If R0 bit 3 is clear:
=> R0 = flags
R1 = workspace pointer
R2 = input pointer
R3 = bytes of input available
R4 = output pointer
R5 = bytes of output space available
<= R0 = status
R1 preserved
R2 = pointer to first unused input byte
R3 = input bytes unused
R4 = pointer to first unused output byte
R5 = unused output space remaining
Call this SWI initially with R0 = 8 and R1 = input file size, using the sizes it reports to allocate workspace and output buffers as appropriate. Then call repeatedly with R0 bit 3 clear until all the data is processed (as reported via the status bits returned in R0). If all the input data can be presented at once (R0 bits 0,1 clear) and the output buffer is large enough, a faster algorithm is used.
See PRM 4, page 102.
Squash_Compress flags
Bit Meaning if set
0 Continuing existing operation
1 More input remains after this
2 0 (reserved)
3 return workspace needed and max output size (all other bits must be 0)
4-31 0 (reserved)
Squash_Compress statuses
Value Meaning
0 Operation complete
1 Input exhausted (R3 = 0)
2 Output space exhausted (R5 < 12)
|
|
|