Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

scsu.h

00001 /*
00002 ******************************************************************************
00003 *
00004 *   Copyright (C) 1998-2001, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 ******************************************************************************
00008 *
00009 * File scsu.h
00010 *
00011 * Modification History:
00012 *
00013 *   Date        Name        Description
00014 *   05/17/99    stephen     Creation (ported from java UnicodeCompressor.java)
00015 *   09/21/99    stephen     Updated to handle data splits on decompression.
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 /* Number of windows */
00035 #define USCSU_NUM_WINDOWS 8
00036 #define USCSU_NUM_STATIC_WINDOWS 8
00037 
00038 /* Maximum value for a window's index */
00039 #define USCSU_MAX_INDEX 0xFF
00040 
00041 /* The size of the internal buffer for a UnicodeCompressor. */
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

Generated on Mon Mar 4 22:08:39 2002 for ICU 2.0 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002