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 =========================================================================*/
23 #ifndef vtkZLibDataCompressor_h
24 #define vtkZLibDataCompressor_h
25 
26 #include "vtkIOCoreModule.h" // For export macro
27 #include "vtkDataCompressor.h"
28 
29 class VTKIOCORE_EXPORT vtkZLibDataCompressor : public vtkDataCompressor
30 {
31 public:
33  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
34  static vtkZLibDataCompressor* New();
35 
42  size_t GetMaximumCompressionSpace(size_t size) VTK_OVERRIDE;
43 
45 
48  vtkSetClampMacro(CompressionLevel, int, 0, 9);
49  vtkGetMacro(CompressionLevel, int);
51 
52 protected:
54  ~vtkZLibDataCompressor() VTK_OVERRIDE;
55 
56  int CompressionLevel;
57 
58  // Compression method required by vtkDataCompressor.
59  size_t CompressBuffer(unsigned char const* uncompressedData,
60  size_t uncompressedSize,
61  unsigned char* compressedData,
62  size_t compressionSpace) VTK_OVERRIDE;
63  // Decompression method required by vtkDataCompressor.
64  size_t UncompressBuffer(unsigned char const* compressedData,
65  size_t compressedSize,
66  unsigned char* uncompressedData,
67  size_t uncompressedSize) VTK_OVERRIDE;
68 private:
69  vtkZLibDataCompressor(const vtkZLibDataCompressor&) VTK_DELETE_FUNCTION;
70  void operator=(const vtkZLibDataCompressor&) VTK_DELETE_FUNCTION;
71 };
72 
73 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Abstract interface for data compression classes.
virtual size_t GetMaximumCompressionSpace(size_t size)=0
Get the maximum space that may be needed to store data of the given uncompressed size after compressi...
a simple class to control print indentation
Definition: vtkIndent.h:33
Data compression using zlib.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...