home *** CD-ROM | disk | FTP | other *** search
- ifnd LIBRARIES_COMPRESS_I
- LIBRARIES_COMPRESS_I equ 1
-
- ifnd UTILITY_TAGITEM_I
- include "utility/tagitem.i"
- endc
-
- CS_Tags equ TAG_USER+'CI'
-
- * Tags for CompInfo() *
- CS_ProgramName equ (CS_Tags+1) ; Name of program/implementation
- CS_AuthorName equ (CS_Tags+2) ; Name of author
- CS_AlgoName equ (CS_Tags+3) ; Name of compression algorithm
- CS_CompSpeed equ (CS_Tags+4) ; Approximate compression speed (CPS)
- CS_DecompSpeed equ (CS_Tags+5) ; Approximate decompression speed
- CS_AsyncComp equ (CS_Tags+6) ; Asynchronous compression supported
- CS_AsyncDecomp equ (CS_Tags+7) ; Asynchronous decompression supported
- CS_BlockComp equ (CS_Tags+8) ; Multiblock compression supported
- CS_BlockDecomp equ (CS_Tags+9) ; Multiblock decompression supported
-
- * Tags for Compress() and Decompress() *
- CS_InputBuffer equ (CS_Tags+1) ; Pointer to data to compress (required)
- CS_InputSize equ (CS_Tags+2) ; Size of input data (required)
- CS_OutputBuffer equ (CS_Tags+3) ; Pointer to output buffer (required)
- CS_IOHook equ (CS_Tags+4) ; Hook for blocked data I/O (alternate)
- CS_AsyncMsg equ (CS_Tags+5) ; Message to reply when call finished
-
- * Algorithm-specific tags for Compress() and Decompress() *
- CS_LZMaxBits equ (CS_Tags+100) ; Max bits of compression for LZ algorithms
-
- * Message passed to programs through the IOHook *
- STRUCTURE CompressIOMsg,0
- LONG ciom_Command ; Defined below
- APTR ciom_BlockPtr ; Next data block (filled by caller)
- LONG ciom_BlockSize ; Size of data block (filled by caller)
- LABEL ciom_SIZEOF
-
- CIOMC_NEXTSOURCE equ 1 ; Get next block of source
- CIOMC_NEXTDEST equ 2 ; Get next destination block
-
- * Error codes returned by Compress() and Decompress() *
- CSERR_NOMEMORY equ -1 ; Not enough memory
- CSERR_INCOMPATIBLE equ -2 ; Wrong algorithm
- CSERR_NOCOMPRESSION equ -3 ; Would get 0% or worse compression
- CSERR_CORRUPT equ -4 ; Corrupt compressed input data
- CSERR_NOHARDWARE equ -5 ; Required hardware missing
- CSERR_HARDFAIL equ -6 ; Hardware failure
- CSERR_BADPARAMS equ -7 ; Bad parameters to comp/decomp call
-
- * Library functions *
- LIBINIT
- LIBDEF _LVOCompressInfo
- LIBDEF _LVOCompress
- LIBDEF _LVODecompress
- LIBDEF _LVOCompressStart
- LIBDEF _LVODecompressStart
- LIBDEF _LVOCompressCheck
- LIBDEF _LVOCompressEnd
-
- endc
-