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 =========================================================================*/
26 #ifndef vtkZLibDataCompressor_h
27 #define vtkZLibDataCompressor_h
28 
29 #include "vtkIOCoreModule.h" // For export macro
30 #include "vtkDataCompressor.h"
31 
32 class VTKIOCORE_EXPORT vtkZLibDataCompressor : public vtkDataCompressor
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37  static vtkZLibDataCompressor* New();
38 
45  size_t GetMaximumCompressionSpace(size_t size) override;
46 
48 
51  // Compression level getter required by vtkDataCompressor.
52  int GetCompressionLevel() override;
53 
54  // Compression level setter required by vtkDataCompresor.
55  void SetCompressionLevel(int compressionLevel) override;
57 
58 protected:
60  ~vtkZLibDataCompressor() override;
61 
63 
64  // Compression method required by vtkDataCompressor.
65  size_t CompressBuffer(unsigned char const* uncompressedData,
66  size_t uncompressedSize,
67  unsigned char* compressedData,
68  size_t compressionSpace) override;
69  // Decompression method required by vtkDataCompressor.
70  size_t UncompressBuffer(unsigned char const* compressedData,
71  size_t compressedSize,
72  unsigned char* uncompressedData,
73  size_t uncompressedSize) override;
74 private:
76  void operator=(const vtkZLibDataCompressor&) = delete;
77 };
78 
79 #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 CompressBuffer(unsigned char const *uncompressedData, size_t uncompressedSize, unsigned char *compressedData, size_t compressionSpace)=0
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:39
virtual size_t UncompressBuffer(unsigned char const *compressedData, size_t compressedSize, unsigned char *uncompressedData, size_t uncompressedSize)=0
Data compression using zlib.
virtual void SetCompressionLevel(int compressionLevel)=0
Compression performance varies greatly with compression level Require level setting from any vtkDataC...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual int GetCompressionLevel()=0