home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / Ti / Magazine / Tests / DOORSOSD.ZIP / ziplib.h < prev    next >
Encoding:
Text File  |  1999-05-30  |  6.3 KB  |  169 lines

  1. ;----------------------------------------------------------------------------
  2. ; check_cmem()
  3. ;
  4. ; Function: Checks if there are enough memory free for
  5. ;           compression ( 2560 B needed ) **AND** for evaluating 
  6. ;        compressed size ( 1140 needed )
  7. ;
  8. ; Input:    A0   = Pointer to data which will be compressed
  9. ;        D0.W = Length of data which will be compressed
  10. ;
  11. ; Output:   D0.W = 0 if NOT enough memory
  12. ;             NO OTHER REGISTERS DESTROYED
  13. ;
  14. ;----------------------------------------------------------------------------
  15. ziplib::check_cmem    equ    ziplib@0000
  16.  
  17. ;----------------------------------------------------------------------------
  18. ; check_emem()
  19. ;
  20. ; Function: Checks if there are enough memory free for
  21. ;           extraction (same command as Hufflib's : check_mem)
  22. ;
  23. ; Input:    A0   = Pointer to compressed data
  24. ;
  25. ; Output:   D0.W = 0 if NOT enough memory
  26. ;        NO OTHER REGISTERS DESTROYED
  27. ;----------------------------------------------------------------------------
  28. ziplib::check_emem    equ    ziplib@0001
  29.  
  30. ;----------------------------------------------------------------------------
  31. ; eval_cmem()
  32. ;
  33. ; Function: Evaluates the mem size of the compressed file.
  34. ;
  35. ; Input:    A0   = Pointer to datas which will be compressed 
  36. ;        D0.L = Length of datas which will be compressed
  37. ;
  38. ; Output:   D0.W = mem size of datas when they will be compressed
  39. ;            NO OTHER REGISTERS DESTROYED
  40. ;----------------------------------------------------------------------------
  41. ziplib::eval_cmem    equ    ziplib@0002
  42.  
  43. ;----------------------------------------------------------------------------
  44. ; eval_emem()
  45. ;
  46. ; Function: Evaluates the mem size of the extracted file.
  47. ;        (works only with single file archive)
  48. ;
  49. ; Input:    A0   = Pointer to datas which will be uncompressed 
  50. ;
  51. ; Output:   D0.W = mem size of datas when they will be uncompressed
  52. ;            NO OTHER REGISTERS DESTROYED
  53. ;----------------------------------------------------------------------------
  54. ziplib::eval_emem    equ    ziplib@0003
  55.  
  56. ;----------------------------------------------------------------------------
  57. ; compress()
  58. ;
  59. ; Function: compress data
  60. ;
  61. ; Input:    A0   = Pointer to uncompressed data
  62. ;           A1   = Pointer to where the compressed data should be stored
  63. ;        D0.W = Length of datas which will be compressed
  64. ;----------------------------------------------------------------------------
  65. ziplib::compress    equ    ziplib@0004
  66.  
  67. ;----------------------------------------------------------------------------
  68. ; extract()
  69. ;
  70. ; Function: Extracts data ( in fact same routine as hufflib's one )
  71. ;
  72. ; Input:    A0   = Pointer to compressed data
  73. ;           A1   = Pointer to where the uncompressed data should be stored
  74. ;----------------------------------------------------------------------------
  75. ziplib::extract    equ    ziplib@0005
  76.  
  77. ;----------------------------------------------------------------------------
  78. ; zipfile()
  79. ;
  80. ; Function: Compress or Extract a file
  81. ;
  82. ; Input:    A0   = Pointer to file in the VAT
  83. ;        D0.B = 0 disable commentary 
  84. ;           1 semi-commentary (error displayed)
  85. ;           else enable commentary (Windows, Confirmations,...)
  86. ;
  87. ; Output:        D0.B = 0 no error                 
  88. ;               1 can't manipulate because file is archived
  89. ;                    2 compressed file bigger than original
  90. ;               3 not enough memory
  91. ;            4 Program running
  92. ;            NO OTHER REGISTERS DESTROYED
  93. ;----------------------------------------------------------------------------
  94. ziplib::zipfile    equ    ziplib@0006
  95.  
  96.  
  97. ;----------------------------------------------------------------------------
  98. ; iscomp()
  99. ;
  100. ; Function: Test if a file is compressed
  101. ;
  102. ; Input:    A0   = Pointer to file in the VAT
  103. ;
  104. ; Output:        D0.W = 0 compressed                 
  105. ;               1 uncompressed
  106. ;
  107. ;            NO OTHER REGISTERS DESTROYED
  108. ;----------------------------------------------------------------------------
  109. ziplib::iscomp        equ    ziplib@000B
  110.  
  111.  
  112. ;----------------------------------------------------------------------------
  113. ; tempfile()
  114. ;
  115. ; Function: Extract a compressed file to a temporary handle
  116. ;
  117. ; Input:    A0   = Pointer to file in the VAT
  118. ;        D0.B = 0 disable commentary 
  119. ;           1 semi-commentary (error displayed)
  120. ;           else enable commentary (Windows, Confirmations,...)
  121. ;
  122. ; Output:         D0.B = 0 no error                 
  123. ;               1 can't manipulate because file is archived, locked or hidden
  124. ;               3 not enough memory
  125. ;            5 File is not a compressed file
  126. ;         D1.W = handle of the temporary file
  127. ;            NO OTHER REGISTERS DESTROYED
  128. ;----------------------------------------------------------------------------
  129. ziplib::tempfile    equ    ziplib@0007
  130.  
  131. ;----------------------------------------------------------------------------
  132. ; extract_string()
  133. ;
  134. ; Function: Extracts a string from huffman compressed data
  135. ;
  136. ; Input:    A0   = Pointer to huffman compressed data
  137. ;           A1   = Pointer to where the string should be stored
  138. ;           D3.W = File number to extract (not necessary if not multifile)
  139. ;           D4.W = String number. First string = number 0
  140. ;----------------------------------------------------------------------------
  141. ziplib::extract_string    equ    ziplib@0008
  142.  
  143. ;----------------------------------------------------------------------------
  144. ; write_string()
  145. ;
  146. ; Function: Writes a compressed string with the current font. The string
  147. ;           should not be longer than 80 characters.
  148. ;
  149. ; Input:    A0   = Pointer to huffman compressed data
  150. ;           D0.W = x location
  151. ;           D1.W = y location
  152. ;           D3.W = File number to extract (not necessary if not multifile)
  153. ;           D4.W = String number. First string = number 0
  154. ;----------------------------------------------------------------------------
  155. ziplib::write_string    equ    ziplib@0009
  156.  
  157. ;----------------------------------------------------------------------------
  158. ; write_string_inv()
  159. ;
  160. ; Function: Writes a compressed string with the current font (inverted color)
  161. ;           The string should not be longer than 80 characters.
  162. ;
  163. ; Input:    A0   = Pointer to huffman compressed data
  164. ;           D0.W = x location
  165. ;           D1.W = y location
  166. ;           D3.W = File number to extract (not necessary if not multifile)
  167. ;           D4.W = String number. First string = number 0
  168. ;----------------------------------------------------------------------------
  169. ziplib::write_string_inv    equ    ziplib@000A