home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 568a.lha / compress.library_v1.0 / programmers / ainclude / libraries / compress.i
Encoding:
Text File  |  1991-10-09  |  2.2 KB  |  61 lines

  1.     ifnd    LIBRARIES_COMPRESS_I
  2. LIBRARIES_COMPRESS_I    equ    1
  3.  
  4.     ifnd    UTILITY_TAGITEM_I
  5.     include "utility/tagitem.i"
  6.     endc
  7.  
  8. CS_Tags    equ    TAG_USER+'CI'
  9.  
  10. * Tags for CompInfo() *
  11. CS_ProgramName    equ    (CS_Tags+1)    ; Name of program/implementation
  12. CS_AuthorName    equ    (CS_Tags+2)    ; Name of author
  13. CS_AlgoName    equ    (CS_Tags+3)    ; Name of compression algorithm
  14. CS_CompSpeed    equ    (CS_Tags+4)    ; Approximate compression speed (CPS)
  15. CS_DecompSpeed    equ    (CS_Tags+5)    ; Approximate decompression speed
  16. CS_AsyncComp    equ    (CS_Tags+6)    ; Asynchronous compression supported
  17. CS_AsyncDecomp    equ    (CS_Tags+7)    ; Asynchronous decompression supported
  18. CS_BlockComp    equ    (CS_Tags+8)    ; Multiblock compression supported
  19. CS_BlockDecomp    equ    (CS_Tags+9)    ; Multiblock decompression supported
  20.  
  21. * Tags for Compress() and Decompress() *
  22. CS_InputBuffer    equ    (CS_Tags+1)    ; Pointer to data to compress (required)
  23. CS_InputSize    equ    (CS_Tags+2)    ; Size of input data (required)
  24. CS_OutputBuffer    equ    (CS_Tags+3)    ; Pointer to output buffer (required)
  25. CS_IOHook    equ    (CS_Tags+4)    ; Hook for blocked data I/O (alternate)
  26. CS_AsyncMsg    equ    (CS_Tags+5)    ; Message to reply when call finished
  27.  
  28. * Algorithm-specific tags for Compress() and Decompress() *
  29. CS_LZMaxBits    equ    (CS_Tags+100)    ; Max bits of compression for LZ algorithms
  30.  
  31. * Message passed to programs through the IOHook *
  32.  STRUCTURE    CompressIOMsg,0
  33.     LONG    ciom_Command        ; Defined below
  34.     APTR    ciom_BlockPtr        ; Next data block (filled by caller)
  35.     LONG    ciom_BlockSize        ; Size of data block (filled by caller)
  36.     LABEL    ciom_SIZEOF
  37.  
  38. CIOMC_NEXTSOURCE    equ    1    ; Get next block of source
  39. CIOMC_NEXTDEST        equ    2    ; Get next destination block
  40.  
  41. * Error codes returned by Compress() and Decompress() *
  42. CSERR_NOMEMORY        equ    -1    ; Not enough memory
  43. CSERR_INCOMPATIBLE    equ    -2    ; Wrong algorithm
  44. CSERR_NOCOMPRESSION    equ    -3    ; Would get 0% or worse compression
  45. CSERR_CORRUPT        equ    -4    ; Corrupt compressed input data
  46. CSERR_NOHARDWARE    equ    -5    ; Required hardware missing
  47. CSERR_HARDFAIL        equ    -6    ; Hardware failure
  48. CSERR_BADPARAMS        equ    -7    ; Bad parameters to comp/decomp call
  49.  
  50. * Library functions *
  51.     LIBINIT
  52.     LIBDEF    _LVOCompressInfo
  53.     LIBDEF    _LVOCompress
  54.     LIBDEF    _LVODecompress
  55.     LIBDEF    _LVOCompressStart
  56.     LIBDEF    _LVODecompressStart
  57.     LIBDEF    _LVOCompressCheck
  58.     LIBDEF    _LVOCompressEnd
  59.  
  60.     endc
  61.