Main Page   Class Hierarchy   Compound List   File List   Header Files   Sources   Compound Members   File Members  

scsu.h File Reference


Compounds

struct  UnicodeCompressor

Defines

#define SCSU_H
#define USCSU_NUM_WINDOWS
#define USCSU_NUM_STATIC_WINDOWS
#define USCSU_MAX_INDEX
#define USCSU_BUFSIZE

Typedefs

typedef struct UnicodeCompressor UnicodeCompressor

Functions

U_CAPI void U_EXPORT2 scsu_init (UnicodeCompressor *comp)
Initialize a UnicodeCompressor. More...

U_CAPI void U_EXPORT2 scsu_reset (UnicodeCompressor *comp)
Reset the compressor to its initial state. More...

U_CAPI void U_EXPORT2 scsu_compress (UnicodeCompressor *comp, uint8_t **target, const uint8_t *targetLimit, const UChar **source, const UChar *sourceLimit, UErrorCode *status)
Compress a Unicode character array into a byte array. More...

U_CAPI void U_EXPORT2 scsu_decompress (UnicodeCompressor *comp, UChar **target, const UChar *targetLimit, const uint8_t **source, const uint8_t *sourceLimit, UErrorCode *status)
Decompress a byte array into a Unicode character array. More...


Define Documentation

#define SCSU_H ()

Definition at line 20 of file scsu.h.

#define USCSU_NUM_WINDOWS ()

Definition at line 25 of file scsu.h.

#define USCSU_NUM_STATIC_WINDOWS ()

Definition at line 26 of file scsu.h.

#define USCSU_MAX_INDEX ()

Definition at line 29 of file scsu.h.

#define USCSU_BUFSIZE ()

Definition at line 32 of file scsu.h.


Typedef Documentation

typedef struct UnicodeCompressor UnicodeCompressor

Definition at line 61 of file scsu.h.


Function Documentation

U_CAPI void U_EXPORT2 scsu_init (UnicodeCompressor * comp)

Initialize a UnicodeCompressor.

Sets all windows to their default values.

See also:
reset
Stable:

U_CAPI void U_EXPORT2 scsu_reset (UnicodeCompressor * comp)

Reset the compressor to its initial state.

Parameters:
comp   The UnicodeCompressor to reset.
Stable:

U_CAPI void U_EXPORT2 scsu_compress (UnicodeCompressor * comp, uint8_t ** target, const uint8_t * targetLimit, const UChar ** source, const UChar * sourceLimit, UErrorCode * status)

Compress a Unicode character array into a byte array.

This function is not guaranteed to completely fill the output buffer, nor is it guaranteed to compress the entire input. If the source data is completely compressed, status will be set to U_ZERO_ERROR. If the source data is not completely compressed, status will be set to U_BUFFER_OVERFLOW_ERROR. If this occurs, larger buffers should be allocated, or data flushed, and the function should be called again with the new buffers.

Parameters:
comp   A pointer to a previously-initialized UnicodeCompressor
target   I/O parameter. On input, a pointer to a buffer of bytes to receive the compressed data. On output, points to the byte following the last byte written. This buffer must be at least 4 bytes.
targetLimit   A pointer to the end of the array target.
source   I/O parameter. On input, a pointer to a buffer of Unicode characters to be compressed. On output, points to the character following the last character compressed.
sourceLimit   A pointer to the end of the array source.
status   A pointer to an UErrorCode to receive any errors.

See also:
decompress
Stable:

U_CAPI void U_EXPORT2 scsu_decompress (UnicodeCompressor * comp, UChar ** target, const UChar * targetLimit, const uint8_t ** source, const uint8_t * sourceLimit, UErrorCode * status)

Decompress a byte array into a Unicode character array.

This function will either completely fill the output buffer, or consume the entire input. If the source data is completely compressed, status will be set to U_ZERO_ERROR. If the source data is not completely compressed, status will be set to U_BUFFER_OVERFLOW_ERROR. If this occurs, larger buffers should be allocated, or data flushed, and the function should be called again with the new buffers.

Parameters:
comp   A pointer to a previously-initialized UnicodeDecompressor
target   I/O parameter. On input, a pointer to a buffer of Unicode characters to receive the compressed data. On output, points to the character following the last character written. This buffer must be at least 2 bytes.
targetLimit   A pointer to the end of the array target.
source   I/O parameter. On input, a pointer to a buffer of bytes to be decompressed. On output, points to the byte following the last byte decompressed.
sourceLimit   A pointer to the end of the array source.
status   A pointer to an UErrorCode to receive any errors.
Returns:
The number of Unicode characters writeten to target.

See also:
compress
Stable:

Generated at Wed Aug 16 16:05:27 2000 for ICU1.6 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999