VTK
vtkZLibDataCompressor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkZLibDataCompressor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef __vtkZLibDataCompressor_h
26 #define __vtkZLibDataCompressor_h
27 
28 #include "vtkDataCompressor.h"
29 
31 {
32 public:
34  void PrintSelf(ostream& os, vtkIndent indent);
35  static vtkZLibDataCompressor* New();
36 
41  unsigned long GetMaximumCompressionSpace(unsigned long size);
42 
44 
45  vtkSetClampMacro(CompressionLevel, int, 0, 9);
46  vtkGetMacro(CompressionLevel, int);
48 
49 protected:
52 
54 
55  // Compression method required by vtkDataCompressor.
56  unsigned long CompressBuffer(const unsigned char* uncompressedData,
57  unsigned long uncompressedSize,
58  unsigned char* compressedData,
59  unsigned long compressionSpace);
60  // Decompression method required by vtkDataCompressor.
61  unsigned long UncompressBuffer(const unsigned char* compressedData,
62  unsigned long compressedSize,
63  unsigned char* uncompressedData,
64  unsigned long uncompressedSize);
65 private:
66  vtkZLibDataCompressor(const vtkZLibDataCompressor&); // Not implemented.
67  void operator=(const vtkZLibDataCompressor&); // Not implemented.
68 };
69 
70 #endif
Abstract interface for data compression classes.
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
Data compression using zlib.
#define VTK_IO_EXPORT
static vtkObject * New()
virtual unsigned long CompressBuffer(const unsigned char *uncompressedData, unsigned long uncompressedSize, unsigned char *compressedData, unsigned long compressionSpace)=0
virtual unsigned long GetMaximumCompressionSpace(unsigned long size)=0
virtual unsigned long UncompressBuffer(const unsigned char *compressedData, unsigned long compressedSize, unsigned char *uncompressedData, unsigned long uncompressedSize)=0