You can support the development on the Github Sponsors page.


Tools > COMPRESSION SANDBOX


tiny viewer for packed resources, that supports chained grouping and packing with RLE/LZ77/Huffman code
made by lb_ii
uploaded by lb_ii
added:
updated:
download cartridge
- CLICK TO PLAY -

13


Use arrows keys for selecting, entering and exiting files & folders.

See https://github.com/lolbot-iichan/compression_tic80/ for packer.

Cartridge map memory areas are used for compressed data storage.
Everything is handled by single lua function UNPAK() of <2000 characters long (about 100 SLOC), which supports chained containers of:
- RLE-compressed data
- LZ77-compressed data
- Canonical Huffman Coding-compressed data
- raw data
- folder containers
- pack (array) containers
- text containers
- binary containers
- image containers with custom pallete

Comments


StinkerB06

NICE! How did you compress those files?

StinkerB06

Can it be able to store an audio file and use it as 4-bit sample playback?

StinkerB06

Just realized file data is maintained within the map editor. Seems like Drive A starts at map frame 0,0 and Drive B starts at map frame 0,4. If Nesbox were to make MMC plugin support for TIC-80, then we can't waste up the entire map space then!

lb_ii

Hi!

Packer is written in Python and is avaliable on GitHub (see updated description).
Run 'python arch.py' to create sample world.map file. Import it to TIC-80 with "import map" command.
Use UNPACK(0x8000) and UNPACK(0xC000) to browse unpacked structure of produced archives.

Drives A and B are just aliases for TIC-80 memory ranges started at 0x8000 and 0xC000. Actual API does not require to mount any drive letters, it's just a familiar metaphor for data collection =) You can set any other addresses as well, I just wanted to demonstrate that I can handle several archives.

Map areas is 0x8000~0xFF80. So, I selected A and B to split it into 2 almost equal parts.
Actually you can store archives almost anywhere in TIC-80's memory, including cover image (0x0000~0x3FC0), strites sheet (0x4000~0x8000), and sound area (0xFFE4~0x13FFC). I started with map area because it is easily imported "as is". Maybe I'll add some code to produce disks in sprites.gif and cover.gif as well.

Right now there is no code for audio packing and playback. However, if you have a music/sound composed with TIC-80, with some skills it is possible to have bytes of those compressed and switch tracks by unpacking them into sound memory. It's an interesting idea, I may want to try it as well =)

momoiro

Where did you find those kawaii images?

Tau5

Traceback (most recent call last):
File "arch.py", line 2, in <module>
from PIL import Image
ImportError: No module named PIL


NotSoSerious

i do like the hentai

Anaesthetist101

Those pictures are really inappropriate.

Gunngg

why is there hentai in B:

ricz337

just like redhotsonic said

drive B is categorically disgusting


Post comment