Entry | |
---|---|
R0 | Compress Flags |
R1 | Input size of file to be compressed |
-1 >= do not return maximum output size |
Exit | |
---|---|
R0 | Required workspace size |
R1 | Maximum output size (if requested), or -1 if not asked or unable to determine |
Entry | |
---|---|
R0 | Compress Flags |
R1 | Workspace pointer |
R2 | Input pointer |
R3 | Number of bytes of input available |
R4 | Output pointer |
R5 | Number of bytes of output space available |
Exit | |
---|---|
R0 | Compress 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 |
The purpose of this call is to provide lossless compression.
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.