/* ******************************************************************************* * * Copyright (C) 1998-1999, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* * * File scsu.h * * Modification History: * * Date Name Description * 05/17/99 stephen Creation (ported from java UnicodeCompressor.java) * 09/21/99 stephen Updated to handle data splits on decompression. ******************************************************************************* */ #ifndef SCSU_H #define SCSU_H 1 #include "unicode/utypes.h" /* Number of windows */ #define USCSU_NUM_WINDOWS 8 #define USCSU_NUM_STATIC_WINDOWS 8 /* Maximum value for a window's index */ #define USCSU_MAX_INDEX 0xFF /* The size of the internal buffer for a UnicodeCompressor. */ #define USCSU_BUFSIZE 3 struct UnicodeCompressor { int32_t fCurrentWindow; int32_t fOffsets [ USCSU_NUM_WINDOWS ]; int32_t fMode; int32_t fIndexCount [ USCSU_MAX_INDEX + 1 ]; int32_t fTimeStamps [ USCSU_NUM_WINDOWS ]; int32_t fTimeStamp; uint8_t fBuffer [ USCSU_BUFSIZE ]; int32_t fBufferLength; }; typedef struct UnicodeCompressor UnicodeCompressor; U_CAPI void U_EXPORT2 scsu_init(UnicodeCompressor *comp); U_CAPI void U_EXPORT2 scsu_reset(UnicodeCompressor *comp); U_CAPI void U_EXPORT2 scsu_compress(UnicodeCompressor *comp, uint8_t **target, const uint8_t *targetLimit, const UChar **source, const UChar *sourceLimit, UErrorCode *status); U_CAPI void U_EXPORT2 scsu_decompress(UnicodeCompressor *comp, UChar **target, const UChar *targetLimit, const uint8_t **source, const uint8_t *sourceLimit, UErrorCode *status); #endif