HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Compression.h File Reference
#include <openvdb/Types.h>
#include <openvdb/MetaMap.h>
#include <openvdb/math/Math.h>
#include "io.h"
#include "DelayedLoadMetadata.h"
#include <algorithm>
#include <iostream>
#include <memory>
#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::MaskCompress< ValueT, MaskT >
 
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 size_t openvdb::OPENVDB_VERSION_NAME::io::zipToStreamSize (const char *data, size_t numBytes)
 
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 size_t openvdb::OPENVDB_VERSION_NAME::io::bloscToStreamSize (const char *data, size_t valSize, size_t numVals)
 
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, DelayedLoadMetadata *metadata=nullptr, size_t metadataOffset=size_t(0))
 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, DelayedLoadMetadata *, size_t)
 Specialization for std::string input. More...
 
template<typename T >
size_t openvdb::OPENVDB_VERSION_NAME::io::writeDataSize (const T *data, Index count, uint32_t compression)
 
template<>
size_t openvdb::OPENVDB_VERSION_NAME::io::writeDataSize< std::string > (const std::string *data, Index count, uint32_t)
 Specialization for std::string output. 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 >
size_t openvdb::OPENVDB_VERSION_NAME::io::writeCompressedValuesSize (ValueT *srcBuf, Index srcCount, const MaskT &valueMask, uint8_t maskMetadata, bool toHalf, uint32_t compress)
 
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)