PGROB/UPGROB v 3.4, with LOOK, a sample application. Author: Erik Bryntse Date: Thu Nov 21 1991 =========================================== GROB COMPRESSION / UNCOMPRESSION PROGRAMS =========================================== Since the old version of my PGROB/UPGROB programs were unreliable, I fixed them a few months ago. But when I was about to release them, the Redundance Fighter by Lutz Wieweg appeared, and since it was better in many ways, I never released my updated programs. [Note: RF is on Goodies Disk #5. PGROB/UPGROB was not put on that disk because of their bugs, now fixed. Thanx, Eric! -jkh-] But since then I have gotten many questions about PGROB/UPGROB, so I will release the updated versions anyway. I hope some of you may find it useful. After some work on PGROB and UPGROB they have now been almost completely rewritten. They no longer corrupt RAM, and have a nicer user interface. GROB and PGROB are 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/10 of its original size, but a very complex picture may not be compressed at all (or even increase in size). Since UPGROB is very small (177 bytes) and fast, it can easily be imple- mented in games and other programs, where you wish to have nice screens without using too much memory. It will probably save memory even if you only have one screen GROB. The programs behave well with all necessary error checking. A checksum on the dimensions of the compressed GROB is included in the string that PGROB returns. When uncompressing, the data must fill exactly that space, other- wise a "Error: Bad Argument Value" occurs. This means that it is unlikely that UPGROB should accept a string that is not a compressed GROB. PGROB ----- 1: GROB --> 1: String Usage: Compresses GROB Errors: "Bad Argument Value" if X or Y size larger than 4095 pixels UPGROB ------ 1: String --> 1: GROB Usage: Uncompresses GROB Errors: "Bad Argument Value" if checksum wrong or length wrong In the LOOK directory: LOOK ---- 1: String Usage: Uncompress and show. Use arrow keys to move around. LUCY ---- A compressed GROB, use LOOK and look for yourself! LUCY is compressed to 49% of its size, saving 1925 bytes. [Press LUCY, then LOOK, then arrow keys to scroll... -jkh-] Happy graphing! Erik Bryntse erikmb@etek.chalmers.se