Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

scsu.h File Reference

C API: Standard Compression Scheme for Unicode. More...

#include "unicode/utypes.h"

Go to the source code of this file.

Compounds

struct  UnicodeCompressor
 The UnicodeCompressor struct. More...


Defines

#define SCSU_H   1
#define USCSU_NUM_WINDOWS   8
#define USCSU_NUM_STATIC_WINDOWS   8
#define USCSU_MAX_INDEX   0xFF
#define USCSU_BUFSIZE   3

Typedefs

typedef 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...


Detailed Description

C API: Standard Compression Scheme for Unicode.

Standard Compression Scheme for Unicode

Deprecated:
To be replaced by scsu encoding converter; this entire module will be removed after 2001-dec-31.

Definition in file scsu.h.


Define Documentation

#define SCSU_H   1
 

Definition at line 20 of file scsu.h.

#define USCSU_BUFSIZE   3
 

Definition at line 41 of file scsu.h.

#define USCSU_MAX_INDEX   0xFF
 

Definition at line 38 of file scsu.h.

#define USCSU_NUM_STATIC_WINDOWS   8
 

Definition at line 35 of file scsu.h.

#define USCSU_NUM_WINDOWS   8
 

Definition at line 34 of file scsu.h.


Typedef Documentation

typedef struct UnicodeCompressor UnicodeCompressor
 

Definition at line 70 of file scsu.h.


Function Documentation

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:
Deprecated:
To be replaced by scsu encoding converter

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:
Deprecated:
To be replaced by scsu encoding converter

U_CAPI void U_EXPORT2 scsu_init UnicodeCompressor   comp
 

Initialize a UnicodeCompressor.

Sets all windows to their default values.

See also:
reset
Stable:
Deprecated:
To be replaced by scsu encoding converter

U_CAPI void U_EXPORT2 scsu_reset UnicodeCompressor   comp
 

Reset the compressor to its initial state.

Parameters:
comp  The UnicodeCompressor to reset.
Stable:
Deprecated:
To be replaced by scsu encoding converter


Generated on Mon Dec 3 19:00:30 2001 for ICU 2.0 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001