<<< NOTE >>> The complete package contains the following files: -File- -CRC- -Description- CRC $DEDC902B Calculates the CRC-checksum of a file LPack $089E818A The packer/unpacker LPack.doc This document Pack.s The source code of the packing routines ReturnCodes.doc Return codes The checksums can be calculated with CRC. If some of the checksums is wrong, the file is corrupt. In that case you must not use it. These files are freeware and they may be freely spread and used as long as they are left unchanged. These programs are written in assembly. They are completely re-entrant (pure) and pc-relocatable. They should work on all Amiga models and configurations and they are carefully tested, but we are not responsible for any damage caused by them. Send bug reports, suggestions and other mail to: Markku Vähäaho or Terje Bergström Eerontie 17 Jukolanahde 4 D 15 02180 Espoo 02180 Espoo Finland Finland Usenet: terje.bergstrom@f500.n515.z2.fidonet.org Fidonet: Terje Bergstrom@2:515/500.14 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> LPack is a superfast (but not very efficient) file packer/unpacker. Those two things cause that some people use it often, some never... <<< FEATURES >>> * Small * Superfast (packs up to 100 kb/second, unpacks up to 200 kb/second) * Unpack-routine included (can be used in your own programs) * Good command-line parser * You can pack all your textfiles with LPack. LightMore can unpack them before showing * Returns error codes (for script use) <<< USAGE >>> Check that you have arp.library V39+ in LIBS:. LPack can be run only from CLI. Usage: LPack can be either a file or a directory. If it is a directory, it must end with a ":" or a "/". LPack appends a ".lp"-suffix to packed files. Some examples: LPack MyPic.raw ram: Packs "MyPic.raw" from the current directory to "ram:MyPic.raw.lp". LPack ram:MyPic.raw.lp ram: Unpacks "ram:MyPic.raw.lp" to "ram:MyPic.raw" (removes the suffix). If LPack doesn't find the source file, it appends a ".lp"-suffix to it and tries again. If you have a packed file called "ram:MyPic.raw.lp", you can unpack it to "dh0:Piccy" like this: LPack ram:MyPic dh0:Piccy Or to "dh0:Pictures/MyPic": LPack ram:MyPic dh0:Pictures/ As you can see, the parser is quite flexible. To get help, just type "LPack" without any arguments. <<< PURPOSE >>> Because LPack is so fast and simple, it isn't very efficient when packing "normal" files. But with pictures and some texts etc. it is sometimes more efficient than 'real' crunchers. My friend uses LPack when playing Moria, Nethack or Omega. The save file is about 100-200 kb long, so he packs them with LPack (size reduces about 50%). It can also be used with pictures/music modules, but pictures must be converted to RAW (plain) format first. Here comes an example of a very simple picture: Compression: None (RAW) IFF (DPaint) LPack PowerPacker ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Size (about) 50000 3000-4000 700-800 900-1000 bytes Because LPack uses a very simple compression method, sometimes the packed file isn't shorter than the original one. If this happens, LPack reports "Unable to process file". You will get the same error message if LPack isn't able to unpack the file (though this should never happen.) I (and hopefully you, too) use LPack in many programs containing graphics, samples etc. <<< TECHNICAL INFORMATION >>> If you are a programmer, you might have guessed that LPack uses run-length-encoding (packs repeating characters, like "xxxxxxxxxx" -> "10x"). LPack is written in optimized pure assembly, so it's VERY fast. You can use the pack/unpack-routines in your own programs freely. It is very simple: just look at the source code (Pack.s). You also need some information on the LPack header. Here it is: Offset: 0 'LPv1' ; longword, identification word 4 $xxxxxxxx ; longword, the original length of the non-packed file 8 $xxxxxxxx ; longword, the length of the file (without this header) 12 ; the end, header length = 12 ($C) bytes Always remember to check if Pack/Unpack failed (d0 = -1) and provide a failure path! <<< FINAL WORD >>> I know there are many good crunchers which are much more efficient than LPack, but none of them is nearly as fast as it. It can often be used as a "real-time-packer". I hope you find it useful... Markku Vähäaho, Lightning Inc.