00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
#ifndef SCSU_H
00020
#define SCSU_H 1
00021
00022
#include "unicode/utypes.h"
00023
00024
#ifdef ICU_SCSU_USE_DEPRECATES
00025
00034
00035
#define USCSU_NUM_WINDOWS 8
00036
#define USCSU_NUM_STATIC_WINDOWS 8
00037
00038
00039
#define USCSU_MAX_INDEX 0xFF
00040
00041
00042
#define USCSU_BUFSIZE 3
00043
00045
struct UnicodeCompressor {
00046
00048 int32_t fCurrentWindow;
00049
00051 int32_t fOffsets [ USCSU_NUM_WINDOWS ];
00052
00054 int32_t fMode;
00055
00057 int32_t fIndexCount [ USCSU_MAX_INDEX + 1 ];
00058
00060 int32_t fTimeStamps [ USCSU_NUM_WINDOWS ];
00061
00063 int32_t fTimeStamp;
00064
00066 uint8_t fBuffer [ USCSU_BUFSIZE ];
00067
00069 int32_t fBufferLength;
00070 };
00071
typedef struct UnicodeCompressor UnicodeCompressor;
00072
00080 U_CAPI
void U_EXPORT2 scsu_init(UnicodeCompressor *comp);
00081
00088 U_CAPI
void U_EXPORT2 scsu_reset(UnicodeCompressor *comp);
00089
00117 U_CAPI
void U_EXPORT2 scsu_compress(UnicodeCompressor *comp,
00118 uint8_t **target,
00119
const uint8_t *targetLimit,
00120
const UChar **source,
00121
const UChar *sourceLimit,
00122 UErrorCode *status);
00123
00153 U_CAPI
void U_EXPORT2 scsu_decompress(UnicodeCompressor *comp,
00154 UChar **target,
00155
const UChar *targetLimit,
00156
const uint8_t **source,
00157
const uint8_t *sourceLimit,
00158 UErrorCode *status);
00159
00160
#endif
00161
00162
#endif