Main Page   Class Hierarchy   Compound List   File List   Header Files   Sources   Compound Members   File Members  

scsu.h

00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 1998-1999, 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 /* Number of windows */
00025 #define USCSU_NUM_WINDOWS 8
00026 #define USCSU_NUM_STATIC_WINDOWS 8
00027 
00028 /* Maximum value for a window's index */
00029 #define USCSU_MAX_INDEX 0xFF
00030 
00031 /* The size of the internal buffer for a UnicodeCompressor. */
00032 #define USCSU_BUFSIZE 3
00033 
00035 struct UnicodeCompressor {
00036 
00038     int32_t fCurrentWindow;
00039     
00041     int32_t fOffsets    [ USCSU_NUM_WINDOWS ];
00042     
00044     int32_t fMode;
00045 
00047     int32_t fIndexCount [ USCSU_MAX_INDEX + 1 ];
00048     
00050     int32_t fTimeStamps [ USCSU_NUM_WINDOWS ];
00051     
00053     int32_t fTimeStamp;
00054 
00056     uint8_t fBuffer [ USCSU_BUFSIZE ];
00057   
00059     int32_t fBufferLength;
00060 };
00061 typedef struct UnicodeCompressor UnicodeCompressor;
00062 
00069 U_CAPI void U_EXPORT2 scsu_init(UnicodeCompressor *comp);
00070 
00076 U_CAPI void U_EXPORT2 scsu_reset(UnicodeCompressor *comp);
00077 
00104 U_CAPI void U_EXPORT2 scsu_compress(UnicodeCompressor *comp,
00105                         uint8_t           **target,
00106                         const uint8_t     *targetLimit,
00107                         const UChar       **source,
00108                         const UChar       *sourceLimit,
00109                         UErrorCode        *status);
00110 
00139 U_CAPI void U_EXPORT2 scsu_decompress(UnicodeCompressor *comp,
00140                           UChar             **target,
00141                           const UChar       *targetLimit,
00142                           const uint8_t     **source,
00143                           const uint8_t     *sourceLimit,
00144                           UErrorCode        *status);
00145 
00146 #endif

Generated at Mon Jun 5 12:53:04 2000 for ICU1.5 by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999