ParaView
vtkLZ4Compressor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkLZ4Compressor.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
24 #ifndef vtkLZ4Compressor_h
25 #define vtkLZ4Compressor_h
26 
27 #include "vtkImageCompressor.h"
28 #include "vtkNew.h" // needed for vtkNew
29 #include "vtkPVVTKExtensionsRenderingModule.h" // needed for exports
30 
31 class vtkMultiProcessStream;
32 
33 class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkLZ4Compressor : public vtkImageCompressor
34 {
35 public:
36  static vtkLZ4Compressor* New();
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
47  vtkSetClampMacro(Quality, int, 0, 5);
48  vtkGetMacro(Quality, int);
50 
52 
56  virtual int Compress();
57  virtual int Decompress();
59 
61 
64  virtual void SaveConfiguration(vtkMultiProcessStream* stream);
65  virtual bool RestoreConfiguration(vtkMultiProcessStream* stream);
66  virtual const char* SaveConfiguration();
67  virtual const char* RestoreConfiguration(const char* stream);
69 
70 protected:
73 
74  int Quality;
75 
76 private:
77  vtkLZ4Compressor(const vtkLZ4Compressor&) VTK_DELETE_FUNCTION;
78  void operator=(const vtkLZ4Compressor&) VTK_DELETE_FUNCTION;
79 
80  // Used when Quality > 1.
81  vtkNew<vtkUnsignedCharArray> TemporaryBuffer;
82 };
83 
84 #endif
virtual int Decompress()=0
Decompresses and geenartes the decompressed data as output.
virtual const char * SaveConfiguration()
Serialize compressor configuration (but not the data) into the stream.
Superclass for image compressor/decompressor used by Composite Managers.
Image compressor/decompressor that uses LZ4 for fast lossless compression.
virtual bool RestoreConfiguration(vtkMultiProcessStream *stream)
Restore state from the stream.
virtual int Compress()=0
Call this method to compress the input and generate the compressed data.
void PrintSelf(ostream &os, vtkIndent indent)