Subject: GROB Compression Programs (HP48SX) Organization: Chalmers University of Technology, Gothenburg, Sweden Lines: 64 GROB COMPRESSION / UNCOMPRESSION PROGRAMS ========================================= Here is two small programs that compresses and uncompresses GROBs. The compression method is simple Run-Length Encoding, which means that a number of equal nibbles will be compressed into three nibbles saying "here comes 57 nibbles of zeroes" for example. The efficiency of the programs depend largely on the type of GROB that you are using. A picture with large areas of a single pattern and horizontal lines will perhaps be compressed to 1/20 of the original size, but a very complex picture may not be compressed at all (or even increase in size). Since UPGROB is very small (145 bytes) and fast, it can easily be imple- mented in games and other programs, where you wish to have nice screens without running out of memory. It will probably save memory even if you only have one screen GROB. The programs behave nicely with all necessary error checking. PGROB (compress GROB) ----- 1: GROB --> 1: Binary Integer UPGROB (uncompress GROB) ------ 1: Binary Integer --> 1: GROB (Note: the binary integer that PGROB returns is never 16 nibbles long. This means that you cannot edit it, and therefore you cannot crash UPGROB this way.) PGROB in ASC-format Happy graphing! Erik Bryntse erikmb@cd.chalmers.se