SVC_UncompressLZ*

Syntax

#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 0 or greater, it will be the decompressed size. If it is less than 0, this indicates an error.

Description

This function decompresses LZ77 compressed data and writes the data to the specified region of memory.

Decompresses compressed data that is specified by srcp, and stores the result in the area specified in destp.

SVC_UncompressLZ8
The SVC_UncompressLZ8 function can write in 8-bit units. It cannot access VRAM directly.

SVC_UncompressLZ16FromDevice
The SVC_UncompressLZ16FromDevice function can write 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 data into RAM that cannot be byte-accessed, but the speed is slower than SVC_UncompressedLZ8().

The data specified by srcp should be data that was compressed using the command "ntrcomp -l 2". The boundary restrictions of srcp depend on the implementation of the initStream callback.

See Also

MI_UncompressLZ*, SVC_UncompressHuffmanFromDevice, SVC_UncompressRL*

Revision History

2004/07/22 Initial version.


CONFIDENTIAL