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
32class VTKIOCORE_EXPORT vtkZLibDataCompressor : public vtkDataCompressor
33{
34public:
36 void PrintSelf(ostream& os, vtkIndent indent);
38
46
48
51 vtkSetClampMacro(CompressionLevel, int, 0, 9);
52 vtkGetMacro(CompressionLevel, int);
54
55protected:
58
60
61 // Compression method required by vtkDataCompressor.
62 size_t CompressBuffer(unsigned char const* uncompressedData,
63 size_t uncompressedSize,
64 unsigned char* compressedData,
65 size_t compressionSpace);
66 // Decompression method required by vtkDataCompressor.
67 size_t UncompressBuffer(unsigned char const* compressedData,
68 size_t compressedSize,
69 unsigned char* uncompressedData,
70 size_t uncompressedSize);
71private:
72 vtkZLibDataCompressor(const vtkZLibDataCompressor&) VTK_DELETE_FUNCTION;
73 void operator=(const vtkZLibDataCompressor&) VTK_DELETE_FUNCTION;
74};
75
76#endif
Abstract interface for data compression classes.
a simple class to control print indentation
Definition: vtkIndent.h:40
Data compression using zlib.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
size_t UncompressBuffer(unsigned char const *compressedData, size_t compressedSize, unsigned char *uncompressedData, size_t uncompressedSize)
size_t CompressBuffer(unsigned char const *uncompressedData, size_t uncompressedSize, unsigned char *compressedData, size_t compressionSpace)
static vtkZLibDataCompressor * New()
size_t GetMaximumCompressionSpace(size_t size)
Get the maximum space that may be needed to store data of the given uncompressed size after compressi...
@ size
Definition: vtkX3D.h:253