SVC_UncompressLZ*

C Specification

#include <nitro/os/common/systemCall.h>

void SVC_UncompressLZ8( const void* srcp, void* destp );

s32 SVC_UncompressLZ16FromDevice( const void* srcp,
void* destp,
const void* paramp,
const MIReadStreamCallbacks *callbacks);

Arguments

srcp Source address where the LZ77 compressed data is stored.
destp Destination address for decompression.
paramp Parameter address that is handed to the initStream function of the MIReadStreamCallBacks structure.
callbacks Address of the MIReadStreamCallbacks socket.

Return Values

There is no return value for SVC_UncompressLZ8().
If the return value for SVC_UncompressLZ16FromDevice() is greater than 0, it is the decompressed size. If it is less than 0, it is an error.

Description

This function decompresses LZ77 compressed data and writes the data to the specified region of memory. Match the source address src to the 4-byte boundary. If the size of the compressed data is not a multiple of 4, make adjustments by paring the size back using 0.

The SVC_UncompressLZ8() function can be written in 8-bit units. You cannot decompress directly to VRAM().
The SVC_UncompressLZ16FromDevice() function can be written in 16-bit units. Compressed data on devices that are not memory mapped can be decompressed directly without using a temporary buffer. It is possible to decompress into RAM that cannot be byte-accessed, but the speed is slower than SVC_UncompressedLZ8(). For compressed data, allow for a 2-byte lead when searching for matching strings.

See Also

MI_UncompressLZ*, SVC_UncompressHuffmanFromDevice, SVC_UncompressRL*

Revision History

07/22/2004 Initial Version