00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00024 #ifndef __vtkDataCompressor_h
00025 #define __vtkDataCompressor_h
00026
00027 #include "vtkObject.h"
00028
00029 class vtkUnsignedCharArray;
00030
00031 class VTK_IO_EXPORT vtkDataCompressor : public vtkObject
00032 {
00033 public:
00034 vtkTypeRevisionMacro(vtkDataCompressor,vtkObject);
00035 void PrintSelf(ostream& os, vtkIndent indent);
00036
00041 virtual unsigned long GetMaximumCompressionSpace(unsigned long size)=0;
00042
00044
00047 unsigned long Compress(const unsigned char* uncompressedData,
00048 unsigned long uncompressedSize,
00049 unsigned char* compressedData,
00050 unsigned long compressionSpace);
00052
00054
00057 unsigned long Uncompress(const unsigned char* compressedData,
00058 unsigned long compressedSize,
00059 unsigned char* uncompressedData,
00060 unsigned long uncompressedSize);
00062
00064
00066 vtkUnsignedCharArray* Compress(const unsigned char* uncompressedData,
00067 unsigned long uncompressedSize);
00069
00071
00075 vtkUnsignedCharArray* Uncompress(const unsigned char* compressedData,
00076 unsigned long compressedSize,
00077 unsigned long uncompressedSize);
00079 protected:
00080 vtkDataCompressor();
00081 ~vtkDataCompressor();
00082
00083
00084
00085 virtual unsigned long CompressBuffer(const unsigned char* uncompressedData,
00086 unsigned long uncompressedSize,
00087 unsigned char* compressedData,
00088 unsigned long compressionSpace)=0;
00089
00090
00091 virtual unsigned long UncompressBuffer(const unsigned char* compressedData,
00092 unsigned long compressedSize,
00093 unsigned char* uncompressedData,
00094 unsigned long uncompressedSize)=0;
00095 private:
00096 vtkDataCompressor(const vtkDataCompressor&);
00097 void operator=(const vtkDataCompressor&);
00098 };
00099
00100 #endif