VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/Core/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 "vtkIOCoreModule.h" // For export macro
00029 #include "vtkDataCompressor.h"
00030 
00031 class VTKIOCORE_EXPORT vtkZLibDataCompressor : public vtkDataCompressor
00032 {
00033 public:
00034   vtkTypeMacro(vtkZLibDataCompressor,vtkDataCompressor);
00035   void PrintSelf(ostream& os, vtkIndent indent);
00036   static vtkZLibDataCompressor* New();
00037 
00042   size_t GetMaximumCompressionSpace(size_t size);
00043 
00045 
00046   vtkSetClampMacro(CompressionLevel, int, 0, 9);
00047   vtkGetMacro(CompressionLevel, int);
00049 
00050 protected:
00051   vtkZLibDataCompressor();
00052   ~vtkZLibDataCompressor();
00053 
00054   int CompressionLevel;
00055 
00056   // Compression method required by vtkDataCompressor.
00057   size_t CompressBuffer(unsigned char const* uncompressedData,
00058                         size_t uncompressedSize,
00059                         unsigned char* compressedData,
00060                         size_t compressionSpace);
00061   // Decompression method required by vtkDataCompressor.
00062   size_t UncompressBuffer(unsigned char const* compressedData,
00063                           size_t compressedSize,
00064                           unsigned char* uncompressedData,
00065                           size_t uncompressedSize);
00066 private:
00067   vtkZLibDataCompressor(const vtkZLibDataCompressor&);  // Not implemented.
00068   void operator=(const vtkZLibDataCompressor&);  // Not implemented.
00069 };
00070 
00071 #endif