HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Compression.h File Reference
#include <openvdb/Types.h>
#include <openvdb/math/Math.h>
#include "io.h"
#include <hboost/scoped_array.hpp>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
+ Include dependency graph for Compression.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openvdb::OPENVDB_VERSION_NAME::io::RealToHalf< T >
 RealToHalf and its specializations define a mapping from floating-point data types to analogous half float types. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::io::RealToHalf< float >
 
struct  openvdb::OPENVDB_VERSION_NAME::io::RealToHalf< double >
 
struct  openvdb::OPENVDB_VERSION_NAME::io::RealToHalf< Vec2s >
 
struct  openvdb::OPENVDB_VERSION_NAME::io::RealToHalf< Vec2d >
 
struct  openvdb::OPENVDB_VERSION_NAME::io::RealToHalf< Vec3s >
 
struct  openvdb::OPENVDB_VERSION_NAME::io::RealToHalf< Vec3d >
 
struct  openvdb::OPENVDB_VERSION_NAME::io::HalfReader< IsReal, T >
 
struct  openvdb::OPENVDB_VERSION_NAME::io::HalfReader< false, T >
 Partial specialization for non-floating-point types (no half to float promotion) More...
 
struct  openvdb::OPENVDB_VERSION_NAME::io::HalfReader< true, T >
 Partial specialization for floating-point types. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::io::HalfWriter< IsReal, T >
 
struct  openvdb::OPENVDB_VERSION_NAME::io::HalfWriter< false, T >
 Partial specialization for non-floating-point types (no float to half quantization) More...
 
struct  openvdb::OPENVDB_VERSION_NAME::io::HalfWriter< true, T >
 Partial specialization for floating-point types. More...
 

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::io
 

Enumerations

enum  { openvdb::OPENVDB_VERSION_NAME::io::COMPRESS_NONE = 0, openvdb::OPENVDB_VERSION_NAME::io::COMPRESS_ZIP = 0x1, openvdb::OPENVDB_VERSION_NAME::io::COMPRESS_ACTIVE_MASK = 0x2, openvdb::OPENVDB_VERSION_NAME::io::COMPRESS_BLOSC = 0x4 }
 OR-able bit flags for compression options on input and output streams. More...
 
enum  {
  openvdb::OPENVDB_VERSION_NAME::io::NO_MASK_OR_INACTIVE_VALS, openvdb::OPENVDB_VERSION_NAME::io::NO_MASK_AND_MINUS_BG, openvdb::OPENVDB_VERSION_NAME::io::NO_MASK_AND_ONE_INACTIVE_VAL, openvdb::OPENVDB_VERSION_NAME::io::MASK_AND_NO_INACTIVE_VALS,
  openvdb::OPENVDB_VERSION_NAME::io::MASK_AND_ONE_INACTIVE_VAL, openvdb::OPENVDB_VERSION_NAME::io::MASK_AND_TWO_INACTIVE_VALS, openvdb::OPENVDB_VERSION_NAME::io::NO_MASK_AND_ALL_VALS
}
 

Functions

OPENVDB_API std::string openvdb::OPENVDB_VERSION_NAME::io::compressionToString (uint32_t flags)
 Return a string describing the given compression flags. More...
 
template<typename T >
openvdb::OPENVDB_VERSION_NAME::io::truncateRealToHalf (const T &val)
 Return the given value truncated to 16-bit float precision. More...
 
OPENVDB_API void openvdb::OPENVDB_VERSION_NAME::io::zipToStream (std::ostream &, const char *data, size_t numBytes)
 
OPENVDB_API void openvdb::OPENVDB_VERSION_NAME::io::unzipFromStream (std::istream &, char *data, size_t numBytes)
 
OPENVDB_API void openvdb::OPENVDB_VERSION_NAME::io::bloscToStream (std::ostream &, const char *data, size_t valSize, size_t numVals)
 
OPENVDB_API void openvdb::OPENVDB_VERSION_NAME::io::bloscFromStream (std::istream &, char *data, size_t numBytes)
 
template<typename T >
void openvdb::OPENVDB_VERSION_NAME::io::readData (std::istream &is, T *data, Index count, uint32_t compression)
 Read data from a stream. More...
 
template<>
void openvdb::OPENVDB_VERSION_NAME::io::readData< std::string > (std::istream &is, std::string *data, Index count, uint32_t)
 Specialization for std::string input. More...
 
template<typename T >
void openvdb::OPENVDB_VERSION_NAME::io::writeData (std::ostream &os, const T *data, Index count, uint32_t compression)
 
template<>
void openvdb::OPENVDB_VERSION_NAME::io::writeData< std::string > (std::ostream &os, const std::string *data, Index count, uint32_t)
 Specialization for std::string output. More...
 
template<typename ValueT , typename MaskT >
void openvdb::OPENVDB_VERSION_NAME::io::readCompressedValues (std::istream &is, ValueT *destBuf, Index destCount, const MaskT &valueMask, bool fromHalf)
 
template<typename ValueT , typename MaskT >
void openvdb::OPENVDB_VERSION_NAME::io::writeCompressedValues (std::ostream &os, ValueT *srcBuf, Index srcCount, const MaskT &valueMask, const MaskT &childMask, bool toHalf)