Repository navigation
RunLengthEncodeDecode
emutyworks edited this page Nov 2, 2025
·
21 revisions
Run-length encode binary data with php and decode it with assembly code.
- Fixed a bug where data could not be decoded correctly.(main.asm)
- Fixed a bug where data could not be encoded correctly.(RunLengthEncoder.php)
Usage:
php RunLengthEncoder.php <input filename(bin)> <output filename(compression)>
Example:
php RunLengthEncoder.php bg_tile0_1024.bin bg_tile0_compress.bin
| Compression example: Car Game | Compression data size |
|---|---|
| Tile Maps data | 1024 bytes -> 260 bytes (26%) |
| Attributes data | 1024 bytes -> 154 bytes (15%) |
| Sprites data | 2048 bytes -> 634 bytes(31%) |
| Tiles data | 2048 bytes -> 1377 bytes(67%) |
emutyworks | Twitter | YouTube | SoundCloud | itch.io
Car Game
SoundDriver
SoundEditor
RunLengthEncodeDecode
GBAddClockCyclesTool
GBCMapEditor
GBPixelEditor
Learning GB/GBC Programming