lzdefs.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (c) 1996-2006 by Autodesk, Inc.
00003 //
00004 //  By using this code, you are agreeing to the terms and conditions of
00005 //  the License Agreement included in the documentation for this code.
00006 //
00007 //  AUTODESK MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE CORRECTNESS
00008 //  OF THIS CODE OR ANY DERIVATIVE WORKS WHICH INCORPORATE IT. AUTODESK
00009 //  PROVIDES THE CODE ON AN "AS-IS" BASIS AND EXPLICITLY DISCLAIMS ANY
00010 //  LIABILITY, INCLUDING CONSEQUENTIAL AND INCIDENTAL DAMAGES FOR ERRORS,
00011 //  OMISSIONS, AND OTHER PROBLEMS IN THE CODE.
00012 //
00013 //  Use, duplication, or disclosure by the U.S. Government is subject to
00014 //  restrictions set forth in FAR 52.227-19 (Commercial Computer Software
00015 //  Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) (Rights in Technical
00016 //  Data and Computer Software), as applicable.
00017 //
00018 
00022 
00023 #if !defined LZDEFS_HEADER
00024 #define LZDEFS_HEADER
00025 
00026 #define WD_LZ_HISTORY_BUFFER_SIZE               65536
00027 #define WD_LZ_COMPRESSION_AND_OFFSET_CODE_BYTES 3
00028 
00029 #define WD_ZLIB_COMPRESSION_OUTPUT_BUFFER_SIZE  8192
00030 #define WD_ZLIB_DECOMPRESSION_INPUT_BUFFER_SIZE 512
00031 #define WD_ZLIB_DEFLATE_LEVEL                   7   // Normal ZLIB default is 6 or Z_DEFAULT_COMPRESSION
00032 #define WD_ZLIB_DEFLATE_WINDOW_BITS             15  // Max allowed is 15, default is 15 which gives 32K history buffer
00033 #define WD_ZLIB_DEFLATE_MEM_LEVEL               9   // Max allowed is 9, default is 8
00034 
00035 // This following define really belongs in the file PRELOAD.H, but due to some compilation
00036 // issues it was moved here.
00037 #define WD_PORTION_OF_PRELOAD_DATA_NOT_USED_FOR_ZLIB    (2 * 256 * 4)   /* 2 Colormaps of 256 rgba colors */
00038 
00040 
00041 class WHIPTK_API WT_Compressor
00042 {
00043 public:
00044 
00045     virtual                ~WT_Compressor() { }
00046     virtual    WT_Result   start() = 0; // Pure virtual
00047     virtual    WT_Boolean  is_compression_started() = 0; // Pure virtual
00048     virtual    WT_Result   stop()  = 0; // Pure virtual
00049     virtual    WT_Result   compress(int in_size, void const * in_buf) = 0; // Pure virtual
00050 };
00051 
00053 
00054 class WHIPTK_API WT_DeCompressor
00055 {
00056 public:
00057         virtual                ~WT_DeCompressor() { }
00058     virtual    WT_Result   start() = 0; // Pure virtual
00059     virtual    WT_Result   decompress(int desired, int & actual, void * buffer) = 0; // Pure virtual
00060 };
00061 
00062 
00063 #endif // LZDEFS_HEADER

Generated on Tue Jan 6 22:41:13 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5