VTK
dox/IO/vtkZLibDataCompressor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkZLibDataCompressor.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00025 #ifndef __vtkZLibDataCompressor_h
00026 #define __vtkZLibDataCompressor_h
00027 
00028 #include "vtkDataCompressor.h"
00029 
00030 class VTK_IO_EXPORT vtkZLibDataCompressor : public vtkDataCompressor
00031 {
00032 public:
00033   vtkTypeMacro(vtkZLibDataCompressor,vtkDataCompressor);
00034   void PrintSelf(ostream& os, vtkIndent indent);
00035   static vtkZLibDataCompressor* New();  
00036   
00041   unsigned long GetMaximumCompressionSpace(unsigned long size);
00042 
00044 
00045   vtkSetClampMacro(CompressionLevel, int, 0, 9);
00046   vtkGetMacro(CompressionLevel, int);
00048   
00049 protected:
00050   vtkZLibDataCompressor();
00051   ~vtkZLibDataCompressor();
00052   
00053   int CompressionLevel;
00054 
00055   // Compression method required by vtkDataCompressor.
00056   unsigned long CompressBuffer(const unsigned char* uncompressedData,
00057                                unsigned long uncompressedSize,
00058                                unsigned char* compressedData,
00059                                unsigned long compressionSpace);
00060   // Decompression method required by vtkDataCompressor.
00061   unsigned long UncompressBuffer(const unsigned char* compressedData,
00062                                  unsigned long compressedSize,
00063                                  unsigned char* uncompressedData,
00064                                  unsigned long uncompressedSize);
00065 private:
00066   vtkZLibDataCompressor(const vtkZLibDataCompressor&);  // Not implemented.
00067   void operator=(const vtkZLibDataCompressor&);  // Not implemented.
00068 };
00069 
00070 #endif