Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkZLibDataCompressor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkZLibDataCompressor.h,v $
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 =========================================================================*/
00036 #ifndef __vtkZLibDataCompressor_h
00037 #define __vtkZLibDataCompressor_h
00038 
00039 #include "vtkDataCompressor.h"
00040 
00041 class VTK_IO_EXPORT vtkZLibDataCompressor : public vtkDataCompressor
00042 {
00043 public:
00044   vtkTypeRevisionMacro(vtkZLibDataCompressor,vtkDataCompressor);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046   static vtkZLibDataCompressor* New();  
00047   
00052   unsigned long GetMaximumCompressionSpace(unsigned long size);
00053 
00055 
00056   vtkSetClampMacro(CompressionLevel, int, 0, 9);
00057   vtkGetMacro(CompressionLevel, int);
00059   
00060 protected:
00061   vtkZLibDataCompressor();
00062   ~vtkZLibDataCompressor();
00063   
00064   int CompressionLevel;
00065 
00066   // Compression method required by vtkDataCompressor.
00067   unsigned long CompressBuffer(const unsigned char* uncompressedData,
00068                                unsigned long uncompressedSize,
00069                                unsigned char* compressedData,
00070                                unsigned long compressionSpace);
00071   // Decompression method required by vtkDataCompressor.
00072   unsigned long UncompressBuffer(const unsigned char* compressedData,
00073                                  unsigned long compressedSize,
00074                                  unsigned char* uncompressedData,
00075                                  unsigned long uncompressedSize);
00076 private:
00077   vtkZLibDataCompressor(const vtkZLibDataCompressor&);  // Not implemented.
00078   void operator=(const vtkZLibDataCompressor&);  // Not implemented.
00079 };
00080 
00081 #endif