A Description of the ZPack 1 File Format Tim Meekins, Zavtra Software 8372 Morris Rd. Hilliard, OH 43026 (614) 878-6557 January 9, 1991 ZPACK 1 is a file format for storing compressed Super Hi-Res images on an Apple IIgs. ZPACKĘ1 uses a proprietary algorithm for the actual compression. A toolset is available from the author for using both the ZPack algorithm and the ZPACK 1 file format and other additional formats. The ZPack toolset must be licensed from the author if it is to be used in a commercial computer program or application. ZPACK 1 files are stored as binary files and the file name ends with the suffix ".ZP1". The following is a description of the actual file format: ZPackID 3 characters "ZP1" ($5A $50 $31). ZPackRev 1 byte. Major revision number of ZPack toolset. Currently $01. ScanLineArray [0..199] of ZPacked scanlines. Each unpacked scanline is 160 bytes. PackedSCB ZPacked SCB. Originally 200 bytes. PaletteArray [0..15] of ZPacked palettes. Each unpacked palette is 32 bytes. The following pseudo-code demonstrates how a ZPACK 1 file is created using the ZPack algorithm: Output "ZP1" Output ZPackVersion() OldRow <- NULL FOR row <- 1 to 200 ZPack(160,&scanline[row-1],OldRow, Output) OldRow <- &scanline[row-1] NEXT ZPack(200,SCB,NULL,Output) OldPal <- NULL FOR pal <- 1 to 16 ZPack(32,&palette[pal-1],OldPal,Output) OldPal <- &palette[pal-1] NEXT This pseudo-code is already implemented in the tool function ZP1Pack so it is not necessary to learn the details and nuances of a ZPack 1 file. Additional documentation and example source code is available from the author, Tim Meekins, demonstrating the proper usage of the ZPack toolset. See also: Meekins, Tim, "ZPack Reference Manual 2.0", Zavtra Software, 1991.