1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/**
* @ingroup unice68_lib
* @file unice68.h
* @author Benjamin Gerard
* @date 2003/08/06
* @brief ICE! depacker header
*
*/
/* Copyright (C) 1998-2011 Benjamin Gerard
* <http://sourceforge.net/users/benjihan> */
/* Building */
/* Using */
/** @defgroup unice68_lib unice68 library
* @ingroup api68
* @brief ICE! 2.4 depacker.
*
* unice68 library provides functions to depack ICE! packed buffer.
* The depacker used is a rought conversion of the original ICE 2.4
* routine written in 68000 assembler. ICE packer was (and may be
* is) widely used on the Atari ST the Atari ST.
*
* @note unice68 library is re-entrant (thread-safe).
*
* @note It is pretty much impossible to implement a progressive
* version of the depacker. At least the entire packed file must be
* loaded before depacking it because data order is reversed.
*
* @{
*/
/** unice68 symbols specification.
*
* Define special atributs for importing/exporting unice68 symbols.
*/
/** Get unice68 version.
*
* @return version number
*/
int ;
/** Get unice68 version.
*
* @return version string
*/
const char * ;
/** Get ICE depacker version.
*
* @return version number (MAJOR*100+MINOR)
*/
int ;
/** Test ICE and get compressed and uncompresed size.
*
* The unice68_depacked_size() function returns the uncompressed
* size of a ICE compressed buffer. If p_size is not 0 it is fill with
* the size of the compressed data found in header (useful for stream
* operation).
* If the value pointed by p_csize is not 0 the function assumes that it is
* an expected compressed size and compares it to header one. If it differs
* the function returns the bitwise NOT value of uncompressed data. This
* should be a minus value but not -1.
*
* @param buffer buffer with at least 12 bytes of data (ice header).
* @param p_csize Optionnal pointer to store compressed size.
* May be use to verify an expected compressed size.
* See function documentation for more details.
*
* @return uncompressed size
* @retval >0 Uncompressed size
* @retval -1 Error; not a valid ICE packed buffer
* @retval <0 Bitwise NOT of uncompressed size but verify failed.
*
*/
int ;
/** Test ICE and get compressed and uncompresed size.
* @deprecated in favor of unice68_depacked_size()
*/
int ;
/** Depack an ICE buffer to another.
*
* The unice68_depacker() function depacks src input ICE compressed
* buffer into dst output buffer. The dst buffer is assumed to be
* already allocated and large enough.
*
* @param dst output (destination) buffer (uncompressed data).
* @param src input (source) buffer (compressed data).
*
* @return error code
* @retval 0 succcess
* @retval -1 failure
*
* @warning The original ICE depacker may allow to use the same buffer for
* compressed and uncompressed data. Anyway this has not been tested
* and you are encouraged to add guard bands.
*/
int ;
/**
* @}
*/
/* #ifndef _UNICE68_H_ */