Last Modified: 9/3/2021
Decompresses a file encoded with the RLE Compression tool and stores it in memory.
Name | Type | Required | Description |
FileStartAddress | Long Integer | Yes | The starting memory address of the compressed file. |
FileEndAddress | Long Integer | Yes | The ending memory address of the compressed file. |
Syntax: SbsRleDecomp <FileStartAddress>, <FileEndAddress> |
Option UseRLE Global DecompBytes(8191) As Byte MyTiles& = VarPtr&(DecompBytes) SbsRleDecomp LblPtr&(MyGfxStart), LblPtr&(MyGfxEnd) LoadTiles MyTiles&, 128, 256 MyGfxStart: DataFile "c:\SecondBASIC\MyGfx.rle", Bin MyGfxEnd: |
You can retrieve the decompressed data by treating DecompBytes() as a regular array, or use a variable to act as a pointer to this array, as seen in the example above.
The array size must end in an odd number. You can have a maximum value of 65,535, however, that would utilize all available memory.