home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d591 / monopolysrc.lha / MonopolySrc / iff_h.LZH / iff_h / packer.h < prev    next >
C/C++ Source or Header  |  1992-01-06  |  2KB  |  50 lines

  1. #ifndef PACKER_H
  2. #define PACKER_H
  3. /*----------------------------------------------------------------------*
  4.  * PACKER.H  typedefs for Data-Compresser.                1/22/86
  5.  *
  6.  * This module implements the run compression algorithm "cmpByteRun1"; the
  7.  * same encoding generated by Mac's PackBits.
  8.  *
  9.  * By Jerry Morrison and Steve Shaw, Electronic Arts.
  10.  * This software is in the public domain.
  11.  *
  12.  * This version for the Commodore-Amiga computer.
  13.  *----------------------------------------------------------------------*/
  14.  
  15. #ifndef COMPILER_H
  16. #include "mono:iff_h/compiler.h"
  17. #endif
  18.  
  19. /* This macro computes the worst case packed size of a "row" of bytes. */
  20. #define MaxPackedSize(rowSize)  ( (rowSize) + ( ((rowSize)+127) >> 7 ) )
  21.  
  22.  
  23. #ifdef FDwAT  /* Compiler handles Function Declaration with Argument Types */
  24.  
  25. /* Given POINTERS to POINTER variables, packs one row, updating the source
  26.  * and destination pointers. Returns the size in bytes of the packed row.
  27.  * ASSUMES destination buffer is large enough for the packed row.
  28.  * See MaxPackedSize. */
  29. extern LONG PackRow(BYTE **, BYTE **, LONG);
  30.       /*  pSource, pDest,   rowSize */
  31.  
  32. /* Given POINTERS to POINTER variables, unpacks one row, updating the source
  33.  * and destination pointers until it produces dstBytes bytes (i.e., the
  34.  * rowSize that went into PackRow).
  35.  * If it would exceed the source's limit srcBytes or if a run would overrun
  36.  * the destination buffer size dstBytes, it stops and returns TRUE.
  37.  * Otherwise, it returns FALSE (no error). */
  38. extern BOOL UnPackRow(BYTE **, BYTE **, WORD,     WORD);
  39.         /*  pSource, pDest,   srcBytes, dstBytes  */
  40.  
  41. #else /* not FDwAT */
  42.  
  43. extern LONG PackRow();
  44. extern BOOL UnPackRow();
  45.  
  46. #endif /* FDwAT */
  47.  
  48. #endif
  49.  
  50.