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

scsu.h

Go to the documentation of this file.
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 
00033 /* Number of windows */
00034 #define USCSU_NUM_WINDOWS 8
00035 #define USCSU_NUM_STATIC_WINDOWS 8
00036 
00037 /* Maximum value for a window's index */
00038 #define USCSU_MAX_INDEX 0xFF
00039 
00040 /* The size of the internal buffer for a UnicodeCompressor. */
00041 #define USCSU_BUFSIZE 3
00042 
00044 struct UnicodeCompressor {
00045 
00047     int32_t fCurrentWindow;
00048     
00050     int32_t fOffsets    [ USCSU_NUM_WINDOWS ];
00051     
00053     int32_t fMode;
00054 
00056     int32_t fIndexCount [ USCSU_MAX_INDEX + 1 ];
00057     
00059     int32_t fTimeStamps [ USCSU_NUM_WINDOWS ];
00060     
00062     int32_t fTimeStamp;
00063 
00065     uint8_t fBuffer [ USCSU_BUFSIZE ];
00066   
00068     int32_t fBufferLength;
00069 };
00070 typedef struct UnicodeCompressor UnicodeCompressor;
00071 
00079 U_CAPI void U_EXPORT2 scsu_init(UnicodeCompressor *comp);
00080 
00087 U_CAPI void U_EXPORT2 scsu_reset(UnicodeCompressor *comp);
00088 
00116 U_CAPI void U_EXPORT2 scsu_compress(UnicodeCompressor *comp,
00117                         uint8_t           **target,
00118                         const uint8_t     *targetLimit,
00119                         const UChar       **source,
00120                         const UChar       *sourceLimit,
00121                         UErrorCode        *status);
00122 
00152 U_CAPI void U_EXPORT2 scsu_decompress(UnicodeCompressor *comp,
00153                           UChar             **target,
00154                           const UChar       *targetLimit,
00155                           const uint8_t     **source,
00156                           const uint8_t     *sourceLimit,
00157                           UErrorCode        *status);
00158 
00159 #endif

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