# MI_ReadUncompRL*

## C Specification

      #include <nitro/mi/uncomp_stream.h>

      s32 MI_ReadUncompRL8(  MIUncompContextRL *context,
                           const u8* data,
                           u32 len );
      s32 MI_ReadUncompRL16( MIUncompContextRL *context,
                           const u8* data,
                           u32 len );

## Arguments

`context` | Pointer to the context structure for uncompression of RL-compressed data.
data | Pointer to a portion of the data to be uncompressed.
`len` | Size of the data provided in the 2nd argument.

## Return Values

Returns the number of remaining bytes of data being uncompressed. If all of the data is finished being uncompressed, the function returns `0`.

## Description

Performs streaming uncompression of RL-compressed data, doing just the data size given, and copying it to the buffer specified by the `MI_InitUncompContextRL` function.
This function is slow compared to the `MI_UncompressRL*` function, which uncompresses all the data at once.

`MI_ReadUncompRL8()` writes in units of 8 bits. You cannot decompress directly to VRAM().
`MI_ReadUncompRL16()` writes in units of 16 bits. Data can be directly uncompressed to VRAM, but this operates more slowly than `MI_ReadUncompRL8()`.

## Internal Operation

Processing only takes place on the CPU, without the use of a system call or DMA.

## See Also

`MI_UncompressRL*, MI_InitUncompContextRL, MIUncompContextRL,MI_ReadUncompLZ*, MI_ReadUncompHuffman, MI_CompressRL
`

## Revision History

11/30/2004 Initial version.