Si uso el formato HB_Uncompress( <nBytes>, <cCompressed> ) no se bien cual es el valor que ha de tener nBytes.
Si uso el otro formato HB_Uncompress( <nBytes>, <cCompressed>, <nComprLen>, @<cString> ) no se como usar nComprLen.
Os adjunto el "manualillo" de la función (mi englis no es muy bueno)
- Code: Select all Expand view
- HB_Uncompress() : Uncompresses a compressed character string (ZIP).
Syntax
HB_Uncompress( <nBytes>, <cCompressed> ) --> cUncompressed
or
HB_Uncompress( <nBytes> , ;
<cCompressed>, ;
<nComprLen> , ;
@<cString> ) --> nError
Arguments
<nBytes>
This numeric value indicates the number of bytes the uncompressed string is going to have.
<cCompressed>
This is a character string holding the copressed data. It is obtained from function HB_Compress().
<nComprLen>
This numeric value indicates the number of bytes of the input string to uncompress. Use the expression Len(<cCompressed>) to uncompress the entire input string.
@<cString>
This is a pre-allocated character string. It must be passed by reference and receives the uncompressed data.
Return value
The function returns either the uncompressed character string, or a numeric error code indicating success of the uncompression operation. See the description below.
Description
hb_uncompress() is the reverse function of HB_Compress() and uncompressed character string holding ZIP compressed data. It is implemented in two "flavours" allowing for simple and advanced uncompression of data.
The easiest way of uncompressing a character string is by passing the number of bytes for the result string and the ZIP compressed string to hb_uncompress(). In this case, the function returns the uncompressed data as a character string.
Alternatively, the number od bytes to use from <cCompressed> can be specified as <nComprLen>. This requires <cString> be passed by reference as fourth parameter, since the function returns a numeric error code in this case. The value zero indicates a successful operation. Values other than zero can be passed to HB_CompressErrorDesc() to obtain a descriptive error message.
Gracias.