diff options
author | Peter Baumann <p.baumann@jacobs-university.de> | 2010-07-25 09:06:06 +0200 |
---|---|---|
committer | www-data <www-data@ubuntu.localdomain> | 2010-07-30 11:01:53 +0200 |
commit | b74842f68d3b708855b3ce4d0fa5f14689a675e3 (patch) | |
tree | e147df8798a9684f6d55eb54d3c9fd230a0518b6 /compression/tilecompression.hh | |
parent | a1b22298e7c37ec8c068e1899ff9ee0b44fcaaa9 (diff) | |
download | rasdaman-upstream-b74842f68d3b708855b3ce4d0fa5f14689a675e3.tar.gz rasdaman-upstream-b74842f68d3b708855b3ce4d0fa5f14689a675e3.tar.xz rasdaman-upstream-b74842f68d3b708855b3ce4d0fa5f14689a675e3.zip |
PB: cleanup
Diffstat (limited to 'compression/tilecompression.hh')
-rw-r--r-- | compression/tilecompression.hh | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/compression/tilecompression.hh b/compression/tilecompression.hh index 0e566e3..d5fcd8c 100644 --- a/compression/tilecompression.hh +++ b/compression/tilecompression.hh @@ -65,140 +65,51 @@ class RMTimer; class r_Tile_Compression { public: - /// enum used as return for check_data_format enum Support_Format { INVALID=0, COMPRESSION, CONVERSION }; - /// default constructor, fixes size and layout of tile r_Tile_Compression( const r_Minterval &dom, const r_Base_Type *type ); - /// copy constructor r_Tile_Compression( const r_Tile_Compression &src ); - /// destructor virtual ~r_Tile_Compression( void ); - /// check support for fmt static Support_Format check_data_format( r_Data_Format fmt ); - /** - check whether there is support for the given data format; returns COMPRESSION - for a real compression format, CONVERSION for a data exchange format, INVALID othe */ - - /// create a compression class from the data format static r_Tile_Compression *create( r_Data_Format fmt, const r_Minterval &dom, const r_Base_Type *type ) throw(r_Error); - - /// create a compression class from the name of the compression algorithm static r_Tile_Compression *create( const char *name, const r_Minterval &dom, const r_Base_Type *type ) throw(r_Error); - - /// get a data format for a compression name static r_Data_Format get_format_from_name( const char *name ) throw(r_Error); - - /// read name and data format of available tile compression formats static const char *get_format_info( unsigned int number, r_Data_Format &fmt ); - - /// compress virtual void *compress( const void *data, r_ULong &size, const char *options = NULL ) = 0; - /** - compresses data, passes options to the underlying compression scheme - and returns a pointer to the compressed data and its size. Deallocate - the pointer with tilecomp_free() ! - */ - - /// decompress virtual void *decompress( const void *data, r_ULong size, const char *options = NULL ) = 0; - /** - decompresses the compressed data of size bytes, passing options to the - underlying decompression scheme and returns a pointer to the - decompressed data. Deallocate the pointer with tilecomp_free() ! - */ - - /// data format after decompression virtual r_Data_Format get_decomp_format( void ) const; - /** - data format after decompression. This allows easier integration of - data exchange formats with the compression mechanism: real compression - engines return r_Array, DEF containers return their DEF's data format. - This function need only be overloaded if the decompressed format differs - from r_Array. - */ - - /// check whether compression and decompression automatically do the - /// required endianness conversions (this is usually only true for - /// complex approaches like wavelets) virtual bool converts_endianness( void ) const; - - /// returns name of compression scheme virtual const char *get_name( void ) const = 0; - /// returns compression scheme identifier virtual r_Data_Format get_data_format( void ) const = 0; - /// make a copy of this compression scheme virtual r_Tile_Compression *clone( void ) const = 0; - - /// returns the size of one cell r_Bytes get_type_size( void ) const; - /// returns the size of the uncompressed data r_ULong get_tile_size( void ) const; - /// returns tile domain const r_Minterval &get_domain( void ) const; - /// returns tile type const r_Base_Type *get_base_type( void ) const; - /// resume timer (COMPBENCHMARK only) void resume_timer( void ); - /// pause timer (COMPBENCHMARK only) void pause_timer( void ); - - /// set the storage handler virtual void set_storage_handler( const r_Storage_Man &newStore ); - /** - set the storage handler to use for memory (de)allocation of the - pointers returned from (de)compress. By default malloc/free are - used. - */ - - //@Man: internal<--> external data representations - /** - Since the tile compression class must run on client and server, the - data format must be well-specified on both. The following functions - take care of endianness and alignment. - */ - /// write a short to dest static void write_short( void *dest, r_Short val ); - /// write a long to dest static void write_long( void *dest, r_Long val ); - /// read a short from dest static void read_short( const void *src, r_Short &val ); - /// write a short to dest static void read_long( const void *src, r_Long &val ); - - /// structure for storing information about all data formats typedef struct tile_comp_format_s { r_Data_Format format; const char *name; } tile_comp_format_t; - - protected: - - /// get information about a base type's atomic types static unsigned int get_atom_info( const r_Base_Type* baseType, unsigned int* sizes=NULL, unsigned int *idxptr=NULL ); - /** - return number of atomic types in base type, optionally return the - individual sizes in sizes. idxptr must be NULL (or missing) when calling. - */ - - /// instantiate timer for benchmarking with a given level void instantiate_timer( const char *func, int level=0 ); - r_Storage_Man mystore; - r_Minterval mydomain; r_Base_Type *mytype; - r_Parse_Params *compParams; r_Parse_Params *decompParams; - RMTimer *myTimer; - static const tile_comp_format_t all_formats[]; }; |